Return-Path: Delivered-To: apmail-maven-continuum-commits-archive@www.apache.org Received: (qmail 74883 invoked from network); 4 Oct 2007 20:10:32 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 4 Oct 2007 20:10:32 -0000 Received: (qmail 1639 invoked by uid 500); 4 Oct 2007 20:10:21 -0000 Delivered-To: apmail-maven-continuum-commits-archive@maven.apache.org Received: (qmail 1614 invoked by uid 500); 4 Oct 2007 20:10:21 -0000 Mailing-List: contact continuum-commits-help@maven.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: continuum-dev@maven.apache.org Delivered-To: mailing list continuum-commits@maven.apache.org Received: (qmail 1601 invoked by uid 99); 4 Oct 2007 20:10:20 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 04 Oct 2007 13:10:20 -0700 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO eris.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 04 Oct 2007 20:10:24 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 6241C1A9832; Thu, 4 Oct 2007 13:09:33 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r581997 - in /maven/continuum/trunk/continuum-webapp/src/main: java/org/apache/maven/continuum/web/action/admin/ProfileAction.java webapp/WEB-INF/jsp/admin/editProfile.jsp Date: Thu, 04 Oct 2007 20:09:32 -0000 To: continuum-commits@maven.apache.org From: olamy@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20071004200933.6241C1A9832@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: olamy Date: Thu Oct 4 13:09:28 2007 New Revision: 581997 URL: http://svn.apache.org/viewvc?rev=581997&view=rev Log: [CONTINUUM-1508] fix NPE with add button in editProfile when installations list is empty Modified: maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/admin/ProfileAction.java maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/admin/editProfile.jsp Modified: maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/admin/ProfileAction.java URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/admin/ProfileAction.java?rev=581997&r1=581996&r2=581997&view=diff ============================================================================== --- maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/admin/ProfileAction.java (original) +++ maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/admin/ProfileAction.java Thu Oct 4 13:09:28 2007 @@ -151,9 +151,12 @@ throws Exception { Installation installation = installationService.getInstallation( this.getInstallationId() ); - profileService.addInstallationInProfile( profile, installation ); - // read again - this.profile = profileService.getProfile( profile.getId() ); + if ( installation != null ) + { + profileService.addInstallationInProfile( profile, installation ); + // read again + this.profile = profileService.getProfile( profile.getId() ); + } return SUCCESS; } Modified: maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/admin/editProfile.jsp URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/admin/editProfile.jsp?rev=581997&r1=581996&r2=581997&view=diff ============================================================================== --- maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/admin/editProfile.jsp (original) +++ maven/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/admin/editProfile.jsp Thu Oct 4 13:09:28 2007 @@ -101,14 +101,19 @@ - - -
- - - -
-
+ + + +
+ + + +
+
+
+ +
+