felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vvalc...@apache.org
Subject svn commit: r927431 - /felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/deppack/DepPackServlet.java
Date Thu, 25 Mar 2010 14:48:19 GMT
Author: vvalchev
Date: Thu Mar 25 14:48:19 2010
New Revision: 927431

URL: http://svn.apache.org/viewvc?rev=927431&view=rev
Log:
Resolved FELIX-2235 /Deployment plugin fails with internal server error/

Modified:
    felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/deppack/DepPackServlet.java

Modified: felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/deppack/DepPackServlet.java
URL: http://svn.apache.org/viewvc/felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/deppack/DepPackServlet.java?rev=927431&r1=927430&r2=927431&view=diff
==============================================================================
--- felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/deppack/DepPackServlet.java
(original)
+++ felix/trunk/webconsole/src/main/java/org/apache/felix/webconsole/internal/deppack/DepPackServlet.java
Thu Mar 25 14:48:19 2010
@@ -55,6 +55,8 @@ public class DepPackServlet extends Simp
     private static final String ACTION_UNINSTALL = "uninstalldp";
     private static final String PARAMETER_PCK_FILE = "pckfile";
 
+    private static final String DEPL_SERVICE = DeploymentAdmin.class.getName();
+
     // templates
     private final String TEMPLATE;
 
@@ -81,7 +83,7 @@ public class DepPackServlet extends Simp
             if ( params != null )
             {
                 final FileItem pck = getFileItem( params, PARAMETER_PCK_FILE, false );
-                final DeploymentAdmin admin = ( DeploymentAdmin ) this.getService( DeploymentAdmin.class.getName()
);
+                final DeploymentAdmin admin = ( DeploymentAdmin ) this.getService( DEPL_SERVICE
);
                 if ( admin != null )
                 {
                     try
@@ -105,7 +107,7 @@ public class DepPackServlet extends Simp
             final String pckId = req.getPathInfo().substring( req.getPathInfo().lastIndexOf(
'/' ) + 1 );
             if ( pckId != null && pckId.length() > 0 )
             {
-                final DeploymentAdmin admin = ( DeploymentAdmin ) this.getService( DeploymentAdmin.class.getName()
);
+                final DeploymentAdmin admin = ( DeploymentAdmin ) this.getService( DEPL_SERVICE
);
                 if ( admin != null )
                 {
                     try
@@ -158,7 +160,7 @@ public class DepPackServlet extends Simp
         IOException
     {
 
-        final DeploymentAdmin admin = ( DeploymentAdmin ) this.getService( DeploymentAdmin.class.getName()
);
+        final DeploymentAdmin admin = ( DeploymentAdmin ) this.getService( DEPL_SERVICE );
 
         StringWriter w = new StringWriter();
         PrintWriter w2 = new PrintWriter(w);



Mime
View raw message