portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tay...@apache.org
Subject svn commit: r549920 - /portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/tools/pamanager/PortletApplicationManager.java
Date Fri, 22 Jun 2007 18:15:38 GMT
Author: taylor
Date: Fri Jun 22 11:15:37 2007
New Revision: 549920

URL: http://svn.apache.org/viewvc?view=rev&rev=549920
Log:
better error checking

Modified:
    portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/tools/pamanager/PortletApplicationManager.java

Modified: portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/tools/pamanager/PortletApplicationManager.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/tools/pamanager/PortletApplicationManager.java?view=diff&rev=549920&r1=549919&r2=549920
==============================================================================
--- portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/tools/pamanager/PortletApplicationManager.java
(original)
+++ portals/jetspeed-2/trunk/components/portal/src/java/org/apache/jetspeed/tools/pamanager/PortletApplicationManager.java
Fri Jun 22 11:15:37 2007
@@ -171,8 +171,9 @@
         File webinf = new File (appRoot);
         ClassLoader contextClassLoader = Thread.currentThread().getContextClassLoader();
       
         DirectoryHelper dir = new DirectoryHelper(webinf);
-        MutablePortletApplication app = registry.getPortletApplicationByIdentifier(contextName);
-        if (app.getApplicationType() == MutablePortletApplication.LOCAL)
+        String appName = (contextName.startsWith("/")) ? contextName.substring(1) : contextName;
+        MutablePortletApplication app = registry.getPortletApplicationByIdentifier(appName);
+        if (app != null && app.getApplicationType() == MutablePortletApplication.LOCAL)
         {
             app.setApplicationType(MutablePortletApplication.INTERNAL);
             registry.updatePortletApplication(app);



---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org


Mime
View raw message