| 1 | package fr.sii.ogham.core.exception.clean; | |
| 2 | ||
| 3 | import static fr.sii.ogham.core.CoreConstants.SERIAL_VERSION_UID; | |
| 4 | import static java.util.Collections.unmodifiableList; | |
| 5 | ||
| 6 | import java.util.List; | |
| 7 | ||
| 8 | /** | |
| 9 | * Some resources may be opened while Ogham runs. That's why there is a cleanup | |
| 10 | * mechanism to free/close some resources. Clean-up may fail for any reason. | |
| 11 | * | |
| 12 | * This is a wrapper exception used when performing a full cleanup. It is thrown | |
| 13 | * when at least one cleanup has raised an error. It keeps the list of cleanup | |
| 14 | * failures. | |
| 15 | * | |
| 16 | * @author Aurélien Baudet | |
| 17 | * | |
| 18 | */ | |
| 19 | public class MultipleCleanException extends CleanException { | |
| 20 | private static final long serialVersionUID = SERIAL_VERSION_UID; | |
| 21 | ||
| 22 | private final List<CleanException> causes; | |
| 23 | ||
| 24 | public MultipleCleanException(String message, List<CleanException> causes) { | |
| 25 | super(message); | |
| 26 | this.causes = unmodifiableList(causes); | |
| 27 | } | |
| 28 | ||
| 29 | public List<CleanException> getCauses() { | |
| 30 |
1
1. getCauses : replaced return value with Collections.emptyList for fr/sii/ogham/core/exception/clean/MultipleCleanException::getCauses → NO_COVERAGE |
return causes; |
| 31 | } | |
| 32 | ||
| 33 | } | |
Mutations | ||
| 30 |
1.1 |