cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From b...@apache.org
Subject svn commit: r926141 - /cxf/sandbox/geronimo-jaxrs_1.0_spec/src/main/java/javax/ws/rs/ext/RuntimeDelegate.java
Date Mon, 22 Mar 2010 15:38:26 GMT
Author: bluk
Date: Mon Mar 22 15:38:26 2010
New Revision: 926141

URL: http://svn.apache.org/viewvc?rev=926141&view=rev
Log:
Fix security permissions in RuntimeDelegate

Modified:
    cxf/sandbox/geronimo-jaxrs_1.0_spec/src/main/java/javax/ws/rs/ext/RuntimeDelegate.java

Modified: cxf/sandbox/geronimo-jaxrs_1.0_spec/src/main/java/javax/ws/rs/ext/RuntimeDelegate.java
URL: http://svn.apache.org/viewvc/cxf/sandbox/geronimo-jaxrs_1.0_spec/src/main/java/javax/ws/rs/ext/RuntimeDelegate.java?rev=926141&r1=926140&r2=926141&view=diff
==============================================================================
--- cxf/sandbox/geronimo-jaxrs_1.0_spec/src/main/java/javax/ws/rs/ext/RuntimeDelegate.java
(original)
+++ cxf/sandbox/geronimo-jaxrs_1.0_spec/src/main/java/javax/ws/rs/ext/RuntimeDelegate.java
Mon Mar 22 15:38:26 2010
@@ -26,6 +26,7 @@ import java.io.IOException;
 import java.io.InputStream;
 import java.io.InputStreamReader;
 import java.io.UnsupportedEncodingException;
+import java.lang.reflect.ReflectPermission;
 import java.util.Properties;
 
 import javax.ws.rs.core.Application;
@@ -42,6 +43,10 @@ public abstract class RuntimeDelegate {
         public String toString(T obj);
     }
 
+    protected RuntimeDelegate() {
+        // do nothing
+    }
+
     public abstract <T> T createEndpoint(Application app, java.lang.Class<T>
type);
 
     public abstract UriBuilder createUriBuilder();
@@ -55,6 +60,10 @@ public abstract class RuntimeDelegate {
     private static volatile RuntimeDelegate delegate;
 
     public static void setInstance(RuntimeDelegate delegate) throws SecurityException {
+        SecurityManager secManager = System.getSecurityManager();
+        if (secManager != null) {
+            secManager.checkPermission(new ReflectPermission("suppressAccessChecks"));
+        }
         RuntimeDelegate.delegate = delegate;
     }
 



Mime
View raw message