File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
engine/src/main/java/org/hibernate/validator/internal/util/annotationfactory Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -183,7 +183,9 @@ else if ( m.getDefaultValue() != null ) {
183
183
}
184
184
185
185
private Map <String , Object > getAnnotationValues (Annotation annotation ) {
186
- if ( Proxy .isProxyClass ( annotation .getClass () ) ) {
186
+ // We only enable this optimization if the security manager is not enabled. Otherwise,
187
+ // we would have to add every package containing constraints to the security policy.
188
+ if ( Proxy .isProxyClass ( annotation .getClass () ) && System .getSecurityManager () == null ) {
187
189
InvocationHandler invocationHandler = Proxy .getInvocationHandler ( annotation );
188
190
if ( invocationHandler instanceof AnnotationProxy ) {
189
191
return ( (AnnotationProxy ) invocationHandler ).values ;
You can’t perform that action at this time.
0 commit comments