felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pa...@apache.org
Subject svn commit: r884257 - /felix/trunk/framework.security/src/main/java/org/apache/felix/framework/security/util/Permissions.java
Date Wed, 25 Nov 2009 20:38:36 GMT
Author: pauls
Date: Wed Nov 25 20:38:36 2009
New Revision: 884257

URL: http://svn.apache.org/viewvc?rev=884257&view=rev
Log:
Handle FilePermission with <<ALL FILES>> (FELIX-1103).

Modified:
    felix/trunk/framework.security/src/main/java/org/apache/felix/framework/security/util/Permissions.java

Modified: felix/trunk/framework.security/src/main/java/org/apache/felix/framework/security/util/Permissions.java
URL: http://svn.apache.org/viewvc/felix/trunk/framework.security/src/main/java/org/apache/felix/framework/security/util/Permissions.java?rev=884257&r1=884256&r2=884257&view=diff
==============================================================================
--- felix/trunk/framework.security/src/main/java/org/apache/felix/framework/security/util/Permissions.java
(original)
+++ felix/trunk/framework.security/src/main/java/org/apache/felix/framework/security/util/Permissions.java
Wed Nov 25 20:38:36 2009
@@ -273,30 +273,33 @@
                 {
                     String postfix = "";
                     String name = m_permissionInfos[i].getName();
-                    if (name.endsWith("*") || name.endsWith("-"))
+                    if (!"<<ALL FILES>>".equals(name)) 
                     {
-                        postfix = name.substring(name.length() - 1);
-                        name = name.substring(0, name.length() - 1);
-                    }
-                    if (!(new File(name)).isAbsolute())
-                    {
-                        BundleContext context = bundle.getBundleContext();
-                        if (context == null)
+                        if (name.endsWith("*") || name.endsWith("-"))
                         {
-                            break;
+                            postfix = name.substring(name.length() - 1);
+                            name = name.substring(0, name.length() - 1);
                         }
-                        name =
-                            m_action.getAbsolutePath(new File(context.getDataFile(""), name));
-                    }
-                    if (postfix.length() > 0)
-                    {
-                        if ((name.length() > 0) && !name.endsWith("/"))
+                        if (!(new File(name)).isAbsolute())
                         {
-                            name += "/" + postfix;
+                            BundleContext context = bundle.getBundleContext();
+                            if (context == null)
+                            {
+                                break;
+                            }
+                            name =
+                                m_action.getAbsolutePath(new File(context.getDataFile(""),
name));
                         }
-                        else
+                        if (postfix.length() > 0)
                         {
-                            name += postfix;
+                            if ((name.length() > 0) && !name.endsWith("/"))
+                            {
+                                name += "/" + postfix;
+                            }
+                            else
+                            {
+                                name += postfix;
+                            }
                         }
                     }
                     return createPermission(



Mime
View raw message