portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a..@apache.org
Subject svn commit: r925200 - /portals/jetspeed-2/portal/trunk/maven/jetspeed-mvn-maven-plugin/src/main/java/org/apache/jetspeed/maven/plugins/MvnMojo.java
Date Fri, 19 Mar 2010 12:31:17 GMT
Author: ate
Date: Fri Mar 19 12:31:17 2010
New Revision: 925200

URL: http://svn.apache.org/viewvc?rev=925200&view=rev
Log:
guard against empty property definitions which would cause NPE in Hashtable.put

Modified:
    portals/jetspeed-2/portal/trunk/maven/jetspeed-mvn-maven-plugin/src/main/java/org/apache/jetspeed/maven/plugins/MvnMojo.java

Modified: portals/jetspeed-2/portal/trunk/maven/jetspeed-mvn-maven-plugin/src/main/java/org/apache/jetspeed/maven/plugins/MvnMojo.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/trunk/maven/jetspeed-mvn-maven-plugin/src/main/java/org/apache/jetspeed/maven/plugins/MvnMojo.java?rev=925200&r1=925199&r2=925200&view=diff
==============================================================================
--- portals/jetspeed-2/portal/trunk/maven/jetspeed-mvn-maven-plugin/src/main/java/org/apache/jetspeed/maven/plugins/MvnMojo.java
(original)
+++ portals/jetspeed-2/portal/trunk/maven/jetspeed-mvn-maven-plugin/src/main/java/org/apache/jetspeed/maven/plugins/MvnMojo.java
Fri Mar 19 12:31:17 2010
@@ -261,6 +261,17 @@ public class MvnMojo extends AbstractMoj
                 {
                     t.settingsFile = interpolateRootDir(t.settingsFile);
                 }
+                // make sure target properties are valid
+                if (t.properties != null)
+                {
+                    for (Iterator<String> iter = t.properties.keySet().iterator();
iter.hasNext(); )
+                    {
+                        if (t.properties.get(iter.next()) == null)
+                        {
+                            iter.remove();
+                        }
+                    }
+                }
                 targetsMap.put(t.id, t);
                 i++;
             }



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