continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From c...@apache.org
Subject svn commit: r693082 - /continuum/branches/continuum-transient-state/continuum-core/src/main/java/org/apache/maven/continuum/core/action/AbstractContinuumAction.java
Date Mon, 08 Sep 2008 12:49:09 GMT
Author: ctan
Date: Mon Sep  8 05:49:08 2008
New Revision: 693082

URL: http://svn.apache.org/viewvc?rev=693082&view=rev
Log:
fixed possible NPE

Modified:
    continuum/branches/continuum-transient-state/continuum-core/src/main/java/org/apache/maven/continuum/core/action/AbstractContinuumAction.java

Modified: continuum/branches/continuum-transient-state/continuum-core/src/main/java/org/apache/maven/continuum/core/action/AbstractContinuumAction.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-transient-state/continuum-core/src/main/java/org/apache/maven/continuum/core/action/AbstractContinuumAction.java?rev=693082&r1=693081&r2=693082&view=diff
==============================================================================
--- continuum/branches/continuum-transient-state/continuum-core/src/main/java/org/apache/maven/continuum/core/action/AbstractContinuumAction.java
(original)
+++ continuum/branches/continuum-transient-state/continuum-core/src/main/java/org/apache/maven/continuum/core/action/AbstractContinuumAction.java
Mon Sep  8 05:49:08 2008
@@ -247,7 +247,16 @@
 
     protected static int getInteger( Map context, String key )
     {
-        return ( (Integer) getObject( context, key, null ) ).intValue();
+        Object obj = getObject( context, key, null );
+        
+        if ( obj == null )
+        {
+            return 0;
+        }
+        else
+        {
+            return ( (Integer) obj ).intValue();
+        }
     }
 
     protected static Object getObject( Map context, String key )



Mime
View raw message