Return-Path: Delivered-To: apmail-jakarta-jetspeed-dev-archive@www.apache.org Received: (qmail 8210 invoked from network); 20 Jul 2004 13:52:05 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 20 Jul 2004 13:52:05 -0000 Received: (qmail 49806 invoked by uid 500); 20 Jul 2004 13:52:03 -0000 Delivered-To: apmail-jakarta-jetspeed-dev-archive@jakarta.apache.org Received: (qmail 49774 invoked by uid 500); 20 Jul 2004 13:52:02 -0000 Mailing-List: contact jetspeed-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Jetspeed Developers List" Reply-To: "Jetspeed Developers List" Delivered-To: mailing list jetspeed-dev@jakarta.apache.org Received: (qmail 49760 invoked by uid 500); 20 Jul 2004 13:52:02 -0000 Received: (qmail 49757 invoked by uid 500); 20 Jul 2004 13:52:02 -0000 Received: (qmail 49753 invoked by uid 99); 20 Jul 2004 13:52:02 -0000 X-ASF-Spam-Status: No, hits=0.5 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [209.237.227.194] (HELO minotaur.apache.org) (209.237.227.194) by apache.org (qpsmtpd/0.27.1) with SMTP; Tue, 20 Jul 2004 06:52:02 -0700 Received: (qmail 8146 invoked by uid 1642); 20 Jul 2004 13:52:01 -0000 Date: 20 Jul 2004 13:52:01 -0000 Message-ID: <20040720135201.8145.qmail@minotaur.apache.org> From: weaver@apache.org To: jakarta-jetspeed-2-cvs@apache.org Subject: cvs commit: jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/container/session/impl JetspeedNavigationalStateComponent.java X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N weaver 2004/07/20 06:52:01 Modified: portal/src/java/org/apache/jetspeed/container/session/impl JetspeedNavigationalStateComponent.java Log: Made JetspeedNavigationalStateComponent fail-fast. Revision Changes Path 1.10 +10 -3 jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/container/session/impl/JetspeedNavigationalStateComponent.java Index: JetspeedNavigationalStateComponent.java =================================================================== RCS file: /home/cvs/jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/container/session/impl/JetspeedNavigationalStateComponent.java,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- JetspeedNavigationalStateComponent.java 1 Jun 2004 20:24:23 -0000 1.9 +++ JetspeedNavigationalStateComponent.java 20 Jul 2004 13:52:01 -0000 1.10 @@ -17,7 +17,6 @@ import java.lang.reflect.Constructor; import java.lang.reflect.Field; -import java.util.Enumeration; import java.util.StringTokenizer; import javax.portlet.PortletMode; @@ -31,6 +30,7 @@ import org.apache.jetspeed.container.session.NavigationalStateComponent; import org.apache.jetspeed.container.url.PortalURL; import org.apache.jetspeed.request.RequestContext; +import org.apache.jetspeed.util.ArgUtil; /** * JetspeedNavigationalStateComponent @@ -70,9 +70,16 @@ * @param navClassName name of the class implementing Navigational State instances * @param urlClassName name of the class implementing Portal URL instances * @param navigationsKeys comma-separated list of navigation keys + * @throws ClassNotFoundException if navClassName or urlClassName + * do not exist. */ - public JetspeedNavigationalStateComponent(String navClassName, String urlClassName, String navigationKeys) + public JetspeedNavigationalStateComponent(String navClassName, String urlClassName, String navigationKeys) throws ClassNotFoundException { + ArgUtil.assertNotNull(String.class, navClassName, this); + ArgUtil.assertNotNull(String.class, urlClassName, this); + ArgUtil.assertNotNull(String.class, navigationKeys, this); + this.urlClass = Class.forName(urlClassName); + this.navClass = Class.forName(navClassName); this.navClassName = navClassName; this.urlClassName = urlClassName; this.navigationKeys = navigationKeys; --------------------------------------------------------------------- To unsubscribe, e-mail: jetspeed-dev-unsubscribe@jakarta.apache.org For additional commands, e-mail: jetspeed-dev-help@jakarta.apache.org