FELIX-1048 : Use method for fragment bundle test.

git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@769350 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/webconsole/src/main/java/org/apache/felix/webconsole/internal/core/BundlesServlet.java b/webconsole/src/main/java/org/apache/felix/webconsole/internal/core/BundlesServlet.java
index 49c12a8..722ccb8 100644
--- a/webconsole/src/main/java/org/apache/felix/webconsole/internal/core/BundlesServlet.java
+++ b/webconsole/src/main/java/org/apache/felix/webconsole/internal/core/BundlesServlet.java
@@ -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;
         }