Skip to content

Commit 4194b02

Browse files
committed
HV-1740 Deprecate @SafeHtml for planned future removal
1 parent 124b7dd commit 4194b02

File tree

3 files changed

+6
-0
lines changed

3 files changed

+6
-0
lines changed

engine/src/main/java/org/hibernate/validator/cfg/defs/SafeHtmlDef.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@
1212

1313
/**
1414
* @author Marko Bekta
15+
* @deprecated {@code @SafeHtml} support will be removed in a future version
1516
*/
17+
@Deprecated
1618
public class SafeHtmlDef extends ConstraintDef<SafeHtmlDef, SafeHtml> {
1719

1820
public SafeHtmlDef() {

engine/src/main/java/org/hibernate/validator/constraints/SafeHtml.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,14 @@
3434
* {@code body} tags to the used whitelist as required.
3535
*
3636
* @author George Gastaldi
37+
* @deprecated {@code @SafeHtml} support will be removed in a future version
3738
*/
3839
@Documented
3940
@Constraint(validatedBy = { })
4041
@Target({ METHOD, FIELD, ANNOTATION_TYPE, CONSTRUCTOR, PARAMETER, TYPE_USE })
4142
@Retention(RUNTIME)
4243
@Repeatable(List.class)
44+
@Deprecated
4345
public @interface SafeHtml {
4446

4547
String message() default "{org.hibernate.validator.constraints.SafeHtml.message}";

engine/src/main/java/org/hibernate/validator/internal/constraintvalidators/hv/SafeHtmlValidator.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,9 @@
2727
* @author George Gastaldi
2828
* @author Hardy Ferentschik
2929
* @author Marko Bekhta
30+
* @deprecated {@code @SafeHtml} support will be removed in a future version
3031
*/
32+
@Deprecated
3133
public class SafeHtmlValidator implements ConstraintValidator<SafeHtml, CharSequence> {
3234
private Whitelist whitelist;
3335

0 commit comments

Comments
 (0)