@Test public void shouldStripJavaExpression() { ConstraintViolation<?> violation = cvf.createViolation(ANY_PATH, JAVA_EL_IMMEDIATE); assertThat(violation.getMessage(), is("{2 + 2}")); }
public ConstraintViolation<?> createViolation(final String path, final String message) { checkNotNull(path); checkNotNull(message); return validatorProvider.get().validate(new HelperBean(path, message)).iterator().next(); }
ConstraintViolationFactory extends ComponentSupport { public ConstraintViolation<?> createViolation(final String path, final String message) { checkNotNull(path); checkNotNull(message); return validatorProvider.get().validate(new HelperBean(path, message)).iterator().next(); } }
ConstraintViolationFactory extends ComponentSupport { public ConstraintViolation<?> createViolation(final String path, final String message) { checkNotNull(path); checkNotNull(message); return validatorProvider.get().validate(new HelperBean(path, message)).iterator().next(); } @Inject  ConstraintViolationFactory(final Provider<Validator> validatorProvider); }
ConstraintViolationFactory extends ComponentSupport { public ConstraintViolation<?> createViolation(final String path, final String message) { checkNotNull(path); checkNotNull(message); return validatorProvider.get().validate(new HelperBean(path, message)).iterator().next(); } @Inject  ConstraintViolationFactory(final Provider<Validator> validatorProvider); ConstraintViolation<?> createViolation(final String path, final String message); }
ConstraintViolationFactory extends ComponentSupport { public ConstraintViolation<?> createViolation(final String path, final String message) { checkNotNull(path); checkNotNull(message); return validatorProvider.get().validate(new HelperBean(path, message)).iterator().next(); } @Inject  ConstraintViolationFactory(final Provider<Validator> validatorProvider); ConstraintViolation<?> createViolation(final String path, final String message);  }