felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vvalc...@apache.org
Subject svn commit: r963256 - /felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/core/PermissionsConfigurationPrinter.java
Date Mon, 12 Jul 2010 12:15:47 GMT
Author: vvalchev
Date: Mon Jul 12 12:15:46 2010
New Revision: 963256

URL: http://svn.apache.org/viewvc?rev=963256&view=rev
Log:
Fixed FELIX-2471 /No class def found error - Permissions Admin (see screenshot)/
https://issues.apache.org/jira/browse/FELIX-2471

Modified:
    felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/core/PermissionsConfigurationPrinter.java

Modified: felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/core/PermissionsConfigurationPrinter.java
URL: http://svn.apache.org/viewvc/felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/core/PermissionsConfigurationPrinter.java?rev=963256&r1=963255&r2=963256&view=diff
==============================================================================
--- felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/core/PermissionsConfigurationPrinter.java
(original)
+++ felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/core/PermissionsConfigurationPrinter.java
Mon Jul 12 12:15:46 2010
@@ -39,9 +39,9 @@ public final class PermissionsConfigurat
 
     private static final String TITLE = "Permissions";
 
-    private static final String PERMISSION_ADMIN_NAME = "org.osgi.service.permissionadmin.PermissionAdmin";
+    private static final String PERMISSION_ADMIN_NAME = "org.osgi.service.permissionadmin.PermissionAdmin";
//$NON-NLS-1$
 
-    private static final String CONDITIONAL_PERMISSION_ADMIN_NAME = "org.osgi.service.condpermadmin.ConditionalPermissionAdmin";
+    private static final String CONDITIONAL_PERMISSION_ADMIN_NAME = "org.osgi.service.condpermadmin.ConditionalPermissionAdmin";
//$NON-NLS-1$
 
 
     /**
@@ -60,23 +60,22 @@ public final class PermissionsConfigurat
         final BundleContext bc = getBundleContext();
         final ServiceReference paRef = bc.getServiceReference( PERMISSION_ADMIN_NAME );
         final ServiceReference cpaRef = bc.getServiceReference( CONDITIONAL_PERMISSION_ADMIN_NAME
);
-        final PermissionAdmin pa = paRef != null ? (PermissionAdmin) bc.getService(paRef)
-            : null;
-        final ConditionalPermissionAdmin cpa = cpaRef != null ? (ConditionalPermissionAdmin)
bc.getService(cpaRef)
-            : null;
+        final Object paSvc = paRef != null ? bc.getService(paRef) : null;
+        final Object cpaSvc = cpaRef != null ? bc.getService(cpaRef) : null;
 
         try
         {
             pw.print("Status: Permission Admin ");
-            if (null == pa)
+            if (null == paSvc)
                 pw.print("not ");
             pw.print("available, Conditional Permission Admin ");
-            if (null == cpa)
+            if (null == cpaSvc)
                 pw.print("not ");
             pw.println("available.");
 
-            if (pa != null)
+            if (paSvc != null)
             {
+                final PermissionAdmin pa = (PermissionAdmin) paRef;
                 pw.println();
                 pw.println("Permission Admin");
 
@@ -92,8 +91,9 @@ public final class PermissionsConfigurat
                 }
             }
 
-            if (cpa != null)
+            if (cpaSvc != null)
             {
+                final ConditionalPermissionAdmin cpa = (ConditionalPermissionAdmin) cpaSvc;
                 pw.println();
                 pw.println("Conditional Permission Admin");
 
@@ -116,7 +116,7 @@ public final class PermissionsConfigurat
                     hasPermissions = true;
                     //final ConditionalPermissionInfo info = (ConditionalPermissionInfo)
list.get(i);
                     final ConditionalPermissionInfo info = (ConditionalPermissionInfo) e.nextElement();
-                    pw.print("  ");
+                    pw.print("  "); //$NON-NLS-1$
                     pw.print(info.getName());
 
                     if (getAccessDecision != null)
@@ -124,9 +124,9 @@ public final class PermissionsConfigurat
                         try
                         {
                             final Object ad = getAccessDecision.invoke(info, null);
-                            pw.print(" (");
+                            pw.print(" ("); //$NON-NLS-1$
                             pw.print(ad);
-                            pw.print(")");
+                            pw.print(")"); //$NON-NLS-1$
                         }
                         catch (Throwable t)
                         {
@@ -164,7 +164,7 @@ public final class PermissionsConfigurat
         {
             for (int i = 0, len = infos.length; i < len; i++)
             {
-                pw.print("    ");
+                pw.print("    "); //$NON-NLS-1$
                 pw.println(infos[i].getEncoded());
             }
         }
@@ -181,7 +181,7 @@ public final class PermissionsConfigurat
         {
             for (int i = 0, len = infos.length; i < len; i++)
             {
-                pw.print("    ");
+                pw.print("    "); //$NON-NLS-1$
                 pw.println(infos[i].getEncoded());
             }
         }



Mime
View raw message