#1121 - Shortcut ignored property lookups to prevent NullPointerExceptions.
This commit is contained in:
@@ -156,6 +156,14 @@ class PropertyUtilsTest {
|
||||
});
|
||||
}
|
||||
|
||||
@Test // #1121
|
||||
void considersPropertyWithoutReader() throws Exception {
|
||||
|
||||
InputPayloadMetadata metadata = PropertyUtils.getExposedProperties(WithoutReaderMethod.class);
|
||||
|
||||
assertThat(metadata.getPropertyMetadata("firstname")).isPresent();
|
||||
}
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@JsonIgnoreProperties({ "ignoreThisProperty" })
|
||||
@@ -219,4 +227,13 @@ class PropertyUtilsTest {
|
||||
return employee.getContent();
|
||||
}
|
||||
}
|
||||
|
||||
static class WithoutReaderMethod {
|
||||
|
||||
private String firstname;
|
||||
|
||||
public void setFirstname(String firstname) {
|
||||
this.firstname = firstname;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user