From commits-return-5726-apmail-continuum-commits-archive=continuum.apache.org@continuum.apache.org Thu Aug 27 03:49:26 2009 Return-Path: Delivered-To: apmail-continuum-commits-archive@www.apache.org Received: (qmail 42005 invoked from network); 27 Aug 2009 03:49:26 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 27 Aug 2009 03:49:26 -0000 Received: (qmail 24086 invoked by uid 500); 27 Aug 2009 03:49:26 -0000 Delivered-To: apmail-continuum-commits-archive@continuum.apache.org Received: (qmail 24030 invoked by uid 500); 27 Aug 2009 03:49:25 -0000 Mailing-List: contact commits-help@continuum.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@continuum.apache.org Delivered-To: mailing list commits@continuum.apache.org Received: (qmail 24021 invoked by uid 99); 27 Aug 2009 03:49:25 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 27 Aug 2009 03:49:25 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 27 Aug 2009 03:49:23 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 7D493238885B; Thu, 27 Aug 2009 03:49:03 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit 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 -0000 To: commits@continuum.apache.org From: jzurbano@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20090827034903.7D493238885B@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org 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" ) ); }