felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r769350 - /felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/core/BundlesServlet.java
Date Tue, 28 Apr 2009 11:57:38 GMT
Author: cziegeler
Date: Tue Apr 28 11:57:38 2009
New Revision: 769350

URL: http://svn.apache.org/viewvc?rev=769350&view=rev
Log:
FELIX-1048 : Use method for fragment bundle test.

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

Modified: felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/core/BundlesServlet.java
URL: http://svn.apache.org/viewvc/felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/core/BundlesServlet.java?rev=769350&r1=769349&r2=769350&view=diff
==============================================================================
--- felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/core/BundlesServlet.java
(original)
+++ felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/core/BundlesServlet.java
Tue Apr 28 11:57:38 2009
@@ -455,7 +455,7 @@
             case Bundle.INSTALLED:
                 return "Installed";
             case Bundle.RESOLVED:
-                if ( bundle.getHeaders().get(Constants.FRAGMENT_HOST) != null )
+                if ( isFragmentBundle(bundle) )
                 {
                     return "Fragment";
                 }
@@ -484,10 +484,14 @@
         jw.endObject();
     }
 
+    private boolean isFragmentBundle( Bundle bundle)
+    {
+        return bundle.getHeaders().get(Constants.FRAGMENT_HOST) != null;
+    }
 
     private boolean hasStart( Bundle bundle )
     {
-        if ( bundle.getHeaders().get(Constants.FRAGMENT_HOST) != null )
+        if ( isFragmentBundle(bundle) )
         {
             return false;
         }
@@ -497,7 +501,7 @@
 
     private boolean hasStop( Bundle bundle )
     {
-        if ( bundle.getHeaders().get(Constants.FRAGMENT_HOST) != null )
+        if ( isFragmentBundle(bundle) )
         {
             return false;
         }



Mime
View raw message