portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wea...@apache.org
Subject cvs commit: jakarta-jetspeed-2/portal/src/java/org/apache/jetspeed/container/session/impl JetspeedNavigationalStateComponent.java
Date Tue, 20 Jul 2004 13:52:01 GMT
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 <code>navClassName</code> or <code>urlClassName</code>
  +     * 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


Mime
View raw message