incubator-bval-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mben...@apache.org
Subject svn commit: r1165920 - /incubator/bval/trunk/bval-jsr303/src/main/java/org/apache/bval/jsr303/xml/AnnotationProxyBuilder.java
Date Tue, 06 Sep 2011 23:05:28 GMT
Author: mbenson
Date: Tue Sep  6 23:05:28 2011
New Revision: 1165920

URL: http://svn.apache.org/viewvc?rev=1165920&view=rev
Log:
use local doPrivileged(); decrease scope of suppressed warning

Modified:
    incubator/bval/trunk/bval-jsr303/src/main/java/org/apache/bval/jsr303/xml/AnnotationProxyBuilder.java

Modified: incubator/bval/trunk/bval-jsr303/src/main/java/org/apache/bval/jsr303/xml/AnnotationProxyBuilder.java
URL: http://svn.apache.org/viewvc/incubator/bval/trunk/bval-jsr303/src/main/java/org/apache/bval/jsr303/xml/AnnotationProxyBuilder.java?rev=1165920&r1=1165919&r2=1165920&view=diff
==============================================================================
--- incubator/bval/trunk/bval-jsr303/src/main/java/org/apache/bval/jsr303/xml/AnnotationProxyBuilder.java
(original)
+++ incubator/bval/trunk/bval-jsr303/src/main/java/org/apache/bval/jsr303/xml/AnnotationProxyBuilder.java
Tue Sep  6 23:05:28 2011
@@ -19,7 +19,6 @@ package org.apache.bval.jsr303.xml;
 
 import org.apache.bval.jsr303.Jsr303MetaBeanFactory;
 import org.apache.bval.jsr303.util.SecureActions;
-import org.apache.bval.util.PrivilegedActions;
 
 import javax.validation.Payload;
 import javax.validation.ValidationException;
@@ -171,12 +170,12 @@ final public class AnnotationProxyBuilde
      *
      * @return {@link Annotation}
      */
-    @SuppressWarnings("unchecked")
     public A createAnnotation() {
         ClassLoader classLoader = SecureActions.getClassLoader(getType());
+        @SuppressWarnings("unchecked")
         final Class<A> proxyClass = (Class<A>) Proxy.getProxyClass(classLoader,
getType());
         final InvocationHandler handler = new AnnotationProxy(this);
-        return PrivilegedActions.run(new PrivilegedAction<A>() {
+        return doPrivileged(new PrivilegedAction<A>() {
             public A run() {
                 try {
                     Constructor<A> constructor = proxyClass.getConstructor(InvocationHandler.class);



Mime
View raw message