More cleanup. (FELIX-2035)


git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@943914 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/framework/src/main/java/org/apache/felix/framework/ModuleImpl.java b/framework/src/main/java/org/apache/felix/framework/ModuleImpl.java
index ec53b78..a849bc2 100644
--- a/framework/src/main/java/org/apache/felix/framework/ModuleImpl.java
+++ b/framework/src/main/java/org/apache/felix/framework/ModuleImpl.java
@@ -1277,9 +1277,11 @@
                 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)
                 {
diff --git a/framework/src/main/java/org/apache/felix/framework/util/SecureAction.java b/framework/src/main/java/org/apache/felix/framework/util/SecureAction.java
index a9bc4a4..a10ccac 100644
--- a/framework/src/main/java/org/apache/felix/framework/util/SecureAction.java
+++ b/framework/src/main/java/org/apache/felix/framework/util/SecureAction.java
@@ -611,35 +611,7 @@
             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 @@
     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;