You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by ce...@apache.org on 2002/12/27 12:02:09 UTC

cvs commit: jakarta-struts/src/test/org/apache/struts/mock MockServletContext.java

cedric      2002/12/27 03:02:09

  Modified:    src/test/org/apache/struts/mock MockServletContext.java
  Log:
  Implement getResource() and getResourceAsStream().
  The implementation simply use the underlying method of Class.
  
  Revision  Changes    Path
  1.2       +8 -6      jakarta-struts/src/test/org/apache/struts/mock/MockServletContext.java
  
  Index: MockServletContext.java
  ===================================================================
  RCS file: /home/cvs/jakarta-struts/src/test/org/apache/struts/mock/MockServletContext.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- MockServletContext.java	1 Jul 2002 22:10:35 -0000	1.1
  +++ MockServletContext.java	27 Dec 2002 11:02:09 -0000	1.2
  @@ -191,12 +191,14 @@
   
   
       public URL getResource(String path) {
  -        throw new UnsupportedOperationException();
  +      return this.getClass().getResource(path);
  +        //throw new UnsupportedOperationException();
       }
   
   
       public InputStream getResourceAsStream(String path) {
  -        throw new UnsupportedOperationException();
  +      return this.getClass().getResourceAsStream(path);
  +        //throw new UnsupportedOperationException();
       }
   
   
  
  
  

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>