@Test public void testSanitizationOfNullNestedObjects() { Root root = new Root( " root1 ", null, null ); Optional<Object> sanitizedOpt = new StdValueSanitizer(type -> true).apply(root); assertThat(sanitizedOpt).isPresent(); Root sanitized = (Root) sanitizedOpt.get(); assertThat(sanitized.getName()).isEqualTo("root1"); }
@Override public Optional<Object> apply(Object entity) { return apply(entity, NOTHING); }
StdValueSanitizer extends AbstractFieldSanitizer<Object> { @Override public Optional<Object> apply(Object entity) { return apply(entity, NOTHING); } }
StdValueSanitizer extends AbstractFieldSanitizer<Object> { @Override public Optional<Object> apply(Object entity) { return apply(entity, NOTHING); } StdValueSanitizer(Function<Class<?>, Boolean> innerEntityPredicate); }
StdValueSanitizer extends AbstractFieldSanitizer<Object> { @Override public Optional<Object> apply(Object entity) { return apply(entity, NOTHING); } StdValueSanitizer(Function<Class<?>, Boolean> innerEntityPredicate); @Override Optional<Object> apply(Object entity); }
StdValueSanitizer extends AbstractFieldSanitizer<Object> { @Override public Optional<Object> apply(Object entity) { return apply(entity, NOTHING); } StdValueSanitizer(Function<Class<?>, Boolean> innerEntityPredicate); @Override Optional<Object> apply(Object entity);  }