cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From coli...@apache.org
Subject cvs commit: cocoon-2.1/src/java/org/apache/cocoon/components/flow/javascript JavaScriptInterpreter.java
Date Sun, 27 Apr 2003 08:37:28 GMT
coliver     2003/04/27 01:37:28

  Modified:    src/java/org/apache/cocoon/components/flow/javascript
                        JavaScriptInterpreter.java
  Log:
  Handle null input stream returned from source, e.g. with resource: protocol
  
  Revision  Changes    Path
  1.16      +4 -1      cocoon-2.1/src/java/org/apache/cocoon/components/flow/javascript/JavaScriptInterpreter.java
  
  Index: JavaScriptInterpreter.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/java/org/apache/cocoon/components/flow/javascript/JavaScriptInterpreter.java,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- JavaScriptInterpreter.java	1 Apr 2003 19:19:30 -0000	1.15
  +++ JavaScriptInterpreter.java	27 Apr 2003 08:37:28 -0000	1.16
  @@ -518,6 +518,9 @@
       private Script compileScript(Context cx, Scriptable scope,
                                    Source src) throws Exception {
           InputStream is = src.getInputStream();
  +        if (is == null) {
  +            throw new ResourceNotFoundException(src.getURI() + ": not found");
  +        }
           Reader reader = new BufferedReader(new InputStreamReader(is));
           Script compiledScript = cx.compileReader(scope, reader,
                                                    src.getURI(), 
  
  
  

Mime
View raw message