portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a..@apache.org
Subject svn commit: r378369 - /portals/jetspeed-2/trunk/components/portlet-factory/src/java/org/apache/jetspeed/factory/JetspeedPortletFactory.java
Date Thu, 16 Feb 2006 21:09:20 GMT
Author: ate
Date: Thu Feb 16 13:09:17 2006
New Revision: 378369

URL: http://svn.apache.org/viewcvs?rev=378369&view=rev
Log:
Fixing incorrect usage and implementation of the Pluto ObjectID interface. 
ObjectID itself now can be reliably used as Map key, so there is no need to use ObjectID.toString()
for that.
And, within the context of testcases trying to test non-persistent PortletApplicationDefinitions,
this also 
prevents NullPointerExceptions (testcase components/portal TestPortletDescriptor).
See http://issues.apache.org/jira/browse/JS2-501

Modified:
    portals/jetspeed-2/trunk/components/portlet-factory/src/java/org/apache/jetspeed/factory/JetspeedPortletFactory.java

Modified: portals/jetspeed-2/trunk/components/portlet-factory/src/java/org/apache/jetspeed/factory/JetspeedPortletFactory.java
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/components/portlet-factory/src/java/org/apache/jetspeed/factory/JetspeedPortletFactory.java?rev=378369&r1=378368&r2=378369&view=diff
==============================================================================
--- portals/jetspeed-2/trunk/components/portlet-factory/src/java/org/apache/jetspeed/factory/JetspeedPortletFactory.java
(original)
+++ portals/jetspeed-2/trunk/components/portlet-factory/src/java/org/apache/jetspeed/factory/JetspeedPortletFactory.java
Thu Feb 16 13:09:17 2006
@@ -68,7 +68,7 @@
             synchronized (classLoaderMap)
             {
         unregisterPortletApplication(pa);
-        classLoaderMap.put(pa.getId().toString(), cl);
+        classLoaderMap.put(pa.getId(), cl);
         }
     }
     
@@ -78,7 +78,7 @@
         {
             synchronized (portletCache)
             {
-                ClassLoader cl = (ClassLoader) classLoaderMap.remove(pa.getId().toString());
+                ClassLoader cl = (ClassLoader) classLoaderMap.remove(pa.getId());
                 if (cl != null)
                 {
                     ClassLoader currentContextClassLoader = Thread.currentThread().getContextClassLoader();
@@ -124,7 +124,7 @@
                     if ( className != null )
                     {
                         PortletApplication pa = (PortletApplication)pd.getPortletApplicationDefinition();
-                        ClassLoader paCl = (ClassLoader)classLoaderMap.get(pa.getId().toString());
+                        ClassLoader paCl = (ClassLoader)classLoaderMap.get(pa.getId());
                         if ( paCl == null )
                         {
                             throw new UnavailableException("Portlet Application "+pa.getName()+"
not available");
@@ -184,7 +184,7 @@
                 return portlet;
             }
             
-            ClassLoader paCl = (ClassLoader)classLoaderMap.get(pa.getId().toString());
+            ClassLoader paCl = (ClassLoader)classLoaderMap.get(pa.getId());
             if ( paCl == null )
             {
                 throw new UnavailableException("Portlet Application "+pa.getName()+" not
available");
@@ -256,7 +256,7 @@
         {
           if ( pa != null )
         {
-              return (ClassLoader)classLoaderMap.get(pa.getId().toString());
+              return (ClassLoader)classLoaderMap.get(pa.getId());
         }
           return null;
         }



---------------------------------------------------------------------
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