felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pa...@apache.org
Subject svn commit: r1172801 - in /felix/trunk/framework/src/main/java/org/apache/felix/framework: ExtensionManager.java Felix.java
Date Mon, 19 Sep 2011 20:27:08 GMT
Author: pauls
Date: Mon Sep 19 20:27:07 2011
New Revision: 1172801

URL: http://svn.apache.org/viewvc?rev=1172801&view=rev
Log:
Clean-up some code only needed for the 4.2 ct which works without the workaround in the 4.3
ct now (FELIX-2950)

Modified:
    felix/trunk/framework/src/main/java/org/apache/felix/framework/ExtensionManager.java
    felix/trunk/framework/src/main/java/org/apache/felix/framework/Felix.java

Modified: felix/trunk/framework/src/main/java/org/apache/felix/framework/ExtensionManager.java
URL: http://svn.apache.org/viewvc/felix/trunk/framework/src/main/java/org/apache/felix/framework/ExtensionManager.java?rev=1172801&r1=1172800&r2=1172801&view=diff
==============================================================================
--- felix/trunk/framework/src/main/java/org/apache/felix/framework/ExtensionManager.java (original)
+++ felix/trunk/framework/src/main/java/org/apache/felix/framework/ExtensionManager.java Mon
Sep 19 20:27:07 2011
@@ -309,16 +309,8 @@ class ExtensionManager extends URLStream
         Object sm = System.getSecurityManager();
         if (sm != null)
         {
-            try
-            {
                 ((SecurityManager) sm).checkPermission(
                     new AdminPermission(bundle, AdminPermission.EXTENSIONLIFECYCLE));
-            }
-            catch (SecurityException ex)
-            {
-                // TODO: SECURITY - we need to throw this exception because of the 4.2.0
ct
-                throw new AccessControlException(ex.getMessage());
-            }
         }
 
         if (!((BundleProtectionDomain) bundle.getProtectionDomain()).impliesDirect(new AllPermission()))
@@ -886,4 +878,4 @@ class ExtensionManager extends URLStream
             // Nothing needed here.
         }
     }
-}
\ No newline at end of file
+}

Modified: felix/trunk/framework/src/main/java/org/apache/felix/framework/Felix.java
URL: http://svn.apache.org/viewvc/felix/trunk/framework/src/main/java/org/apache/felix/framework/Felix.java?rev=1172801&r1=1172800&r2=1172801&view=diff
==============================================================================
--- felix/trunk/framework/src/main/java/org/apache/felix/framework/Felix.java (original)
+++ felix/trunk/framework/src/main/java/org/apache/felix/framework/Felix.java Mon Sep 19 20:27:07
2011
@@ -581,24 +581,7 @@ public class Felix extends BundleImpl im
                     security = security.trim();
                     if (Constants.FRAMEWORK_SECURITY_OSGI.equalsIgnoreCase(security) || (security.length()
== 0))
                     {
-                        // TODO: SECURITY - we only need our own security manager to convert
the exceptions
-                        //       because the 4.2.0 ct does expect them like this in one case.
-                        System.setSecurityManager(m_securityManager = new SecurityManager()
-                        {
-                            public void checkPermission(Permission perm)
-                            {
-                                try
-                                {
-                                    super.checkPermission(perm);
-                                }
-                                catch (AccessControlException ex)
-                                {
-                                    SecurityException se = new SecurityException(ex.getMessage());
-                                    se.initCause(ex);
-                                    throw se;
-                                }
-                            }
-                        });
+                        System.setSecurityManager(m_securityManager = new SecurityManager());
                     }
                     else
                     {
@@ -5023,4 +5006,4 @@ public class Felix extends BundleImpl im
     {
         return m_urlHandlersActivator.getContentHandlerService(mimeType);
     }
-}
\ No newline at end of file
+}



Mime
View raw message