continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jzurb...@apache.org
Subject svn commit: r808275 - /continuum/branches/continuum-1.3.x/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/AddProjectAction.java
Date Thu, 27 Aug 2009 03:49:03 GMT
Author: jzurbano
Date: Thu Aug 27 03:49:02 2009
New Revision: 808275

URL: http://svn.apache.org/viewvc?rev=808275&view=rev
Log:
[CONTINUUM-2318] - NPE when adding Ant/Shell Projects
- added null checks


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

Modified: continuum/branches/continuum-1.3.x/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/AddProjectAction.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/AddProjectAction.java?rev=808275&r1=808274&r2=808275&view=diff
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/AddProjectAction.java
(original)
+++ continuum/branches/continuum-1.3.x/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/AddProjectAction.java
Thu Aug 27 03:49:02 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