tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lu...@apache.org
Subject cvs commit: jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/runtime PageContextImpl.java
Date Fri, 04 Oct 2002 00:30:48 GMT
luehe       2002/10/03 17:30:48

  Modified:    jasper2/src/share/org/apache/jasper/runtime
                        PageContextImpl.java
  Log:
  PageContext.removeAttribute(name, scope) and
  PageContext.getAttributeNamesInScope(scope)
  now throw IllegalArgumentException when being passed an invalid scope.
  
  Revision  Changes    Path
  1.25      +6 -8      jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/runtime/PageContextImpl.java
  
  Index: PageContextImpl.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/runtime/PageContextImpl.java,v
  retrieving revision 1.24
  retrieving revision 1.25
  diff -u -r1.24 -r1.25
  --- PageContextImpl.java	3 Oct 2002 23:50:11 -0000	1.24
  +++ PageContextImpl.java	4 Oct 2002 00:30:48 -0000	1.25
  @@ -330,6 +330,7 @@
   		break;
   
   	    default:
  +		throw new IllegalArgumentException("Invalid scope");
   	}
       }
   
  @@ -386,11 +387,8 @@
   	    case APPLICATION_SCOPE:
   		return context.getAttributeNames();
   
  -	    default: return new Enumeration() { // empty enumeration
  -		public boolean hasMoreElements() { return false; }
  -
  -		public Object nextElement() { throw new NoSuchElementException(); }
  -	    };
  +	    default:
  +		throw new IllegalArgumentException("Invalid scope");
   	}
       }
   
  
  
  

--
To unsubscribe, e-mail:   <mailto:tomcat-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-dev-help@jakarta.apache.org>


Mime
View raw message