1 | package fr.sii.ogham.core.exception.clean; | |
2 | ||
3 | import static fr.sii.ogham.core.CoreConstants.SERIAL_VERSION_UID; | |
4 | ||
5 | import fr.sii.ogham.core.clean.Cleanable; | |
6 | ||
7 | /** | |
8 | * Specialized exception that keeps a reference to the {@link Cleanable} | |
9 | * instance which {@link Cleanable#clean()} method has been called and failed. | |
10 | * | |
11 | * This may be useful to manually trying to cleanup again. | |
12 | * | |
13 | * @author Aurélien Baudet | |
14 | * | |
15 | */ | |
16 | public class CleanableException extends CleanException { | |
17 | private static final long serialVersionUID = SERIAL_VERSION_UID; | |
18 | ||
19 | private final transient Cleanable cleanable; | |
20 | ||
21 | public CleanableException(String message, Throwable cause, Cleanable cleanable) { | |
22 | super(message, cause); | |
23 | this.cleanable = cleanable; | |
24 | } | |
25 | ||
26 | public CleanableException(String message, Cleanable cleanable) { | |
27 | super(message); | |
28 | this.cleanable = cleanable; | |
29 | } | |
30 | ||
31 | public CleanableException(Throwable cause, Cleanable cleanable) { | |
32 | super(cause); | |
33 | this.cleanable = cleanable; | |
34 | } | |
35 | ||
36 | public Cleanable getCleanable() { | |
37 |
1
1. getCleanable : replaced return value with null for fr/sii/ogham/core/exception/clean/CleanableException::getCleanable → NO_COVERAGE |
return cleanable; |
38 | } | |
39 | ||
40 | } | |
Mutations | ||
37 |
1.1 |