FELIX-5042 : Get system bundle by location, not number for global bundle list

git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@1703786 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/webconsole/changelog.txt b/webconsole/changelog.txt
index 877a965..2e8cd58 100644
--- a/webconsole/changelog.txt
+++ b/webconsole/changelog.txt
@@ -1,3 +1,9 @@
+Changes from 4.2.12 to 4.2.14
+-----------------------------
+** Bug
+    * [FELIX-5042] - Get system bundle by location, not number for global bundle list
+
+
 Changes from 4.2.10 to 4.2.12
 -----------------------------
 ** Bug
diff --git a/webconsole/pom.xml b/webconsole/pom.xml
index f0efb61..803c73e 100644
--- a/webconsole/pom.xml
+++ b/webconsole/pom.xml
@@ -356,7 +356,7 @@
         <dependency>
             <groupId>org.osgi</groupId>
             <artifactId>org.osgi.core</artifactId>
-            <version>4.1.0</version>
+            <version>4.3.0</version>
             <scope>provided</scope>
         </dependency>
         <dependency>
diff --git a/webconsole/src/main/java/org/apache/felix/webconsole/internal/configuration/ConfigAdminSupport.java b/webconsole/src/main/java/org/apache/felix/webconsole/internal/configuration/ConfigAdminSupport.java
index 85e94e9..582a350 100644
--- a/webconsole/src/main/java/org/apache/felix/webconsole/internal/configuration/ConfigAdminSupport.java
+++ b/webconsole/src/main/java/org/apache/felix/webconsole/internal/configuration/ConfigAdminSupport.java
@@ -496,7 +496,7 @@
         try
         {
             final ServiceReference[] refs = getBundleContext().getServiceReferences(
-                null,
+                (String)null,
                 "(&(" + Constants.OBJECTCLASS + '=' + ManagedService.class.getName() //$NON-NLS-1$
                     + ")(" + Constants.SERVICE_PID + '=' + pid + "))"); //$NON-NLS-1$ //$NON-NLS-2$
             if ( refs != null && refs.length > 0 )
diff --git a/webconsole/src/main/java/org/apache/felix/webconsole/internal/core/BundleContextUtil.java b/webconsole/src/main/java/org/apache/felix/webconsole/internal/core/BundleContextUtil.java
index 09a80c8..4148fe2 100644
--- a/webconsole/src/main/java/org/apache/felix/webconsole/internal/core/BundleContextUtil.java
+++ b/webconsole/src/main/java/org/apache/felix/webconsole/internal/core/BundleContextUtil.java
@@ -18,6 +18,7 @@
 
 
 import org.osgi.framework.BundleContext;
+import org.osgi.framework.Constants;
 
 
 /**
@@ -48,7 +49,7 @@
     {
         if ( WORK_CTX_SYSTEM.equalsIgnoreCase(bc.getProperty(FWK_PROP_WORK_CONTEXT)) )
         {
-            return bc.getBundle(0).getBundleContext();
+            return bc.getBundle(Constants.SYSTEM_BUNDLE_LOCATION).getBundleContext();
         }
         return bc;
     }