1 | package fr.sii.ogham.core.exception.util; | |
2 | ||
3 | import static fr.sii.ogham.core.CoreConstants.SERIAL_VERSION_UID; | |
4 | ||
5 | /** | |
6 | * This specialized exception indicates that a particular property of a bean | |
7 | * couldn't be accessed either because the property doesn't exist or because the | |
8 | * property has no getter or the property access is denied. | |
9 | * | |
10 | * @author Aurélien Baudet | |
11 | * | |
12 | */ | |
13 | @SuppressWarnings({ "squid:MaximumInheritanceDepth" }) // Object, Throwable, | |
14 | // Exception and | |
15 | // RuntimeException are | |
16 | // counted but this is | |
17 | // stupid | |
18 | public class InvalidPropertyException extends BeanWrapperException { | |
19 | private static final long serialVersionUID = SERIAL_VERSION_UID; | |
20 | private final transient Object bean; | |
21 | private final String property; | |
22 | ||
23 | public InvalidPropertyException(String message, Object bean, String property, Throwable cause) { | |
24 | super(message, cause); | |
25 | this.bean = bean; | |
26 | this.property = property; | |
27 | } | |
28 | ||
29 | public InvalidPropertyException(String message, Object bean, String property) { | |
30 | super(message); | |
31 | this.bean = bean; | |
32 | this.property = property; | |
33 | } | |
34 | ||
35 | public Object getBean() { | |
36 |
1
1. getBean : replaced return value with null for fr/sii/ogham/core/exception/util/InvalidPropertyException::getBean → NO_COVERAGE |
return bean; |
37 | } | |
38 | ||
39 | public String getProperty() { | |
40 |
1
1. getProperty : replaced return value with "" for fr/sii/ogham/core/exception/util/InvalidPropertyException::getProperty → NO_COVERAGE |
return property; |
41 | } | |
42 | } | |
Mutations | ||
36 |
1.1 |
|
40 |
1.1 |