optimized getting service

git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@1172579 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/webconsole-plugins/deppack/src/main/java/org/apache/felix/webconsole/plugins/deppack/internal/WebConsolePlugin.java b/webconsole-plugins/deppack/src/main/java/org/apache/felix/webconsole/plugins/deppack/internal/WebConsolePlugin.java
index b47f071..a758a5b 100644
--- a/webconsole-plugins/deppack/src/main/java/org/apache/felix/webconsole/plugins/deppack/internal/WebConsolePlugin.java
+++ b/webconsole-plugins/deppack/src/main/java/org/apache/felix/webconsole/plugins/deppack/internal/WebConsolePlugin.java
@@ -52,8 +52,6 @@
     private static final String ACTION_UNINSTALL = "uninstalldp"; //$NON-NLS-1$

     private static final String PARAMETER_PCK_FILE = "pckfile"; //$NON-NLS-1$

 

-    private static final String DEPL_SERVICE = "org.osgi.service.deploymentadmin.DeploymentAdmin"; //$NON-NLS-1$

-

     // templates

     private final String TEMPLATE;

 

@@ -108,7 +106,7 @@
                 req.getPathInfo().lastIndexOf('/') + 1);

             if (pckId != null && pckId.length() > 0)

             {

-                final DeploymentAdmin admin = (DeploymentAdmin) this.getService(DEPL_SERVICE);

+                final DeploymentAdmin admin = (DeploymentAdmin) adminTracker.getService();

                 if (admin != null)

                 {

                     try

@@ -159,7 +157,7 @@
         throws ServletException, IOException

     {

 

-        final DeploymentAdmin admin = (DeploymentAdmin) this.getService(DEPL_SERVICE);

+        final DeploymentAdmin admin = (DeploymentAdmin) adminTracker.getService();

 

         StringWriter w = new StringWriter();

         PrintWriter w2 = new PrintWriter(w);