felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rickh...@apache.org
Subject svn commit: r943914 - in /felix/trunk/framework/src/main/java/org/apache/felix/framework: ModuleImpl.java util/SecureAction.java
Date Thu, 13 May 2010 15:37:03 GMT
Author: rickhall
Date: Thu May 13 15:37:02 2010
New Revision: 943914

URL: http://svn.apache.org/viewvc?rev=943914&view=rev
Log:
More cleanup. (FELIX-2035)

Modified:
    felix/trunk/framework/src/main/java/org/apache/felix/framework/ModuleImpl.java
    felix/trunk/framework/src/main/java/org/apache/felix/framework/util/SecureAction.java

Modified: felix/trunk/framework/src/main/java/org/apache/felix/framework/ModuleImpl.java
URL: http://svn.apache.org/viewvc/felix/trunk/framework/src/main/java/org/apache/felix/framework/ModuleImpl.java?rev=943914&r1=943913&r2=943914&view=diff
==============================================================================
--- felix/trunk/framework/src/main/java/org/apache/felix/framework/ModuleImpl.java (original)
+++ felix/trunk/framework/src/main/java/org/apache/felix/framework/ModuleImpl.java Thu May
13 15:37:02 2010
@@ -1277,9 +1277,11 @@ public class ModuleImpl implements Modul
                 try
                 {
                     Constructor ctor = (Constructor) m_secureAction.getConstructor(
-                        ModuleClassLoader.class, new Class[] { ModuleImpl.class, ClassLoader.class
});
+                        ModuleClassLoader.class,
+                        new Class[] { ModuleImpl.class, ClassLoader.class });
                     m_classLoader = (ModuleClassLoader)
-                        m_secureAction.invoke(ctor, new Object[] { this, determineParentClassLoader()
});
+                        m_secureAction.invoke(ctor,
+                        new Object[] { this, determineParentClassLoader() });
                 }
                 catch (Exception ex)
                 {

Modified: felix/trunk/framework/src/main/java/org/apache/felix/framework/util/SecureAction.java
URL: http://svn.apache.org/viewvc/felix/trunk/framework/src/main/java/org/apache/felix/framework/util/SecureAction.java?rev=943914&r1=943913&r2=943914&view=diff
==============================================================================
--- felix/trunk/framework/src/main/java/org/apache/felix/framework/util/SecureAction.java
(original)
+++ felix/trunk/framework/src/main/java/org/apache/felix/framework/util/SecureAction.java
Thu May 13 15:37:02 2010
@@ -611,35 +611,7 @@ public class SecureAction
             return new JarFileX(file, verify);
         }
     }
-// TODO: REFACTOR - SecureAction fix needed.
-/*
-    public ModuleClassLoader createModuleClassLoader(ModuleImpl impl)
-    {
-        return createModuleClassLoader(impl, null);
-    }
 
-    public ModuleClassLoader createModuleClassLoader(ModuleImpl impl,
-        ProtectionDomain protectionDomain)
-    {
-        if (System.getSecurityManager() != null)
-        {
-            try
-            {
-                Actions actions = (Actions) m_actions.get();
-                actions.set(Actions.CREATE_MODULECLASSLOADER_ACTION, impl, protectionDomain);
-                return (ModuleClassLoader) AccessController.doPrivileged(actions, m_acc);
-            }
-            catch (PrivilegedActionException ex)
-            {
-                throw (RuntimeException) ex.getException();
-            }
-        }
-        else
-        {
-            return new ModuleClassLoader(impl, protectionDomain);
-        }
-    }
-*/
     public void startActivator(BundleActivator activator, BundleContext context)
         throws Exception
     {
@@ -1075,47 +1047,45 @@ public class SecureAction
     private static class Actions implements PrivilegedExceptionAction
     {
         public static final int INITIALIZE_CONTEXT = 0;
-
         public static final int ADD_EXTENSION_URL = 1;
-        public static final int CREATE_MODULECLASSLOADER_ACTION = 2;
-        public static final int CREATE_TMPFILE_ACTION = 3;
-        public static final int CREATE_URL_ACTION = 4;
-        public static final int CREATE_URL_WITH_CONTEXT_ACTION = 5;
-        public static final int DELETE_FILE_ACTION = 6;
-        public static final int EXEC_ACTION = 7;
-        public static final int FILE_EXISTS_ACTION = 8;
-        public static final int FILE_IS_DIRECTORY_ACTION = 9;
-        public static final int FOR_NAME_ACTION = 10;
-        public static final int GET_ABSOLUTE_PATH_ACTION = 11;
-        public static final int GET_CONSTRUCTOR_ACTION = 12;
-        public static final int GET_DECLARED_CONSTRUCTOR_ACTION = 13;
-        public static final int GET_DECLARED_METHOD_ACTION = 14;
-        public static final int GET_FIELD_ACTION = 15;
-        public static final int GET_FILE_INPUT_ACTION = 16;
-        public static final int GET_FILE_OUTPUT_ACTION = 17;
-        public static final int GET_METHOD_ACTION = 19;
-        public static final int GET_POLICY_ACTION = 20;
-        public static final int GET_PROPERTY_ACTION = 21;
-        public static final int GET_PARENT_CLASS_LOADER_ACTION = 22;
-        public static final int GET_SYSTEM_CLASS_LOADER_ACTION = 23;
-        public static final int GET_URL_INPUT_ACTION = 24;
-        public static final int INVOKE_CONSTRUCTOR_ACTION = 25;
-        public static final int INVOKE_DIRECTMETHOD_ACTION = 26;
-        public static final int INVOKE_METHOD_ACTION = 27;
-        public static final int LIST_DIRECTORY_ACTION = 28;
-        public static final int MAKE_DIRECTORIES_ACTION = 29;
-        public static final int MAKE_DIRECTORY_ACTION = 30;
-        public static final int OPEN_JARX_ACTION = 31;
-        public static final int OPEN_JARX_VERIFY_ACTION = 32;
-        public static final int OPEN_URLCONNECTION_ACTION = 33;
-        public static final int RENAME_FILE_ACTION = 34;
-        public static final int SET_ACCESSIBLE_ACTION = 35;
-        public static final int START_ACTIVATOR_ACTION = 36;
-        public static final int STOP_ACTIVATOR_ACTION = 37;
-        public static final int SWAP_FIELD_ACTION = 38;
-        public static final int SYSTEM_EXIT_ACTION = 39;
-        public static final int FLUSH_FIELD_ACTION = 40;
-        public static final int GET_CLASS_LOADER_ACTION = 41;
+        public static final int CREATE_TMPFILE_ACTION = 2;
+        public static final int CREATE_URL_ACTION = 3;
+        public static final int CREATE_URL_WITH_CONTEXT_ACTION = 4;
+        public static final int DELETE_FILE_ACTION = 5;
+        public static final int EXEC_ACTION = 6;
+        public static final int FILE_EXISTS_ACTION = 7;
+        public static final int FILE_IS_DIRECTORY_ACTION = 8;
+        public static final int FOR_NAME_ACTION = 9;
+        public static final int GET_ABSOLUTE_PATH_ACTION = 10;
+        public static final int GET_CONSTRUCTOR_ACTION = 11;
+        public static final int GET_DECLARED_CONSTRUCTOR_ACTION = 12;
+        public static final int GET_DECLARED_METHOD_ACTION = 13;
+        public static final int GET_FIELD_ACTION = 14;
+        public static final int GET_FILE_INPUT_ACTION = 15;
+        public static final int GET_FILE_OUTPUT_ACTION = 16;
+        public static final int GET_METHOD_ACTION = 17;
+        public static final int GET_POLICY_ACTION = 18;
+        public static final int GET_PROPERTY_ACTION = 19;
+        public static final int GET_PARENT_CLASS_LOADER_ACTION = 20;
+        public static final int GET_SYSTEM_CLASS_LOADER_ACTION = 21;
+        public static final int GET_URL_INPUT_ACTION = 22;
+        public static final int INVOKE_CONSTRUCTOR_ACTION = 23;
+        public static final int INVOKE_DIRECTMETHOD_ACTION = 24;
+        public static final int INVOKE_METHOD_ACTION = 25;
+        public static final int LIST_DIRECTORY_ACTION = 26;
+        public static final int MAKE_DIRECTORIES_ACTION = 27;
+        public static final int MAKE_DIRECTORY_ACTION = 28;
+        public static final int OPEN_JARX_ACTION = 29;
+        public static final int OPEN_JARX_VERIFY_ACTION = 30;
+        public static final int OPEN_URLCONNECTION_ACTION = 31;
+        public static final int RENAME_FILE_ACTION = 32;
+        public static final int SET_ACCESSIBLE_ACTION = 33;
+        public static final int START_ACTIVATOR_ACTION = 34;
+        public static final int STOP_ACTIVATOR_ACTION = 35;
+        public static final int SWAP_FIELD_ACTION = 36;
+        public static final int SYSTEM_EXIT_ACTION = 37;
+        public static final int FLUSH_FIELD_ACTION = 38;
+        public static final int GET_CLASS_LOADER_ACTION = 39;
 
         private int m_action = -1;
         private Object m_arg1 = null;



Mime
View raw message