continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jzurb...@apache.org
Subject svn commit: r808276 - /continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/AddProjectAction.java
Date Thu, 27 Aug 2009 03:53:17 GMT
Author: jzurbano
Date: Thu Aug 27 03:53:17 2009
New Revision: 808276

URL: http://svn.apache.org/viewvc?rev=808276&view=rev
Log:
[CONTINUUM-2318] - NPE when adding Ant/Shell Projects
merge r 808274:808275 from 1.3.x branch
- added null checks


Modified:
    continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/AddProjectAction.java

Modified: continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/AddProjectAction.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/AddProjectAction.java?rev=808276&r1=808275&r2=808276&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/AddProjectAction.java
(original)
+++ continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/AddProjectAction.java
Thu Aug 27 03:53:17 2009
@@ -92,15 +92,15 @@
         clearErrorsAndMessages();
         try
         {
-            if ( !( projectName.trim().length() > 0 ) )
+            if ( ( projectName != null ) && !( projectName.trim().length() > 0
) )
             {
                 addActionError( getText( "addProject.name.required" ) );
             }
-            if ( !( projectVersion.trim().length() > 0 ) )
+            if ( ( projectVersion != null ) && !( projectVersion.trim().length()
> 0 ) )
             {
                 addActionError( getText( "addProject.version.required" ) );
             }
-            if ( !( projectScmUrl.trim().length() > 0 ) )
+            if ( ( projectScmUrl != null ) && !( projectScmUrl.trim().length() >
0 ) )
             {
                 addActionError( getText( "addProject.scmUrl.required" ) );
             }



Mime
View raw message