You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by je...@apache.org on 2003/05/25 11:00:30 UTC
cvs commit: cocoon-2.1/src/java/org/apache/cocoon/environment/commandline CommandLineContext.java
jefft 2003/05/25 02:00:30
Modified: src/java/org/apache/cocoon/environment/commandline
CommandLineContext.java
Log:
If a file doesn't exist, make getResource() return null, to conform to servlet
behaviour. This gets the ResourceExistsSelector working from the command-line
Revision Changes Path
1.2 +2 -1 cocoon-2.1/src/java/org/apache/cocoon/environment/commandline/CommandLineContext.java
Index: CommandLineContext.java
===================================================================
RCS file: /home/cvs/cocoon-2.1/src/java/org/apache/cocoon/environment/commandline/CommandLineContext.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- CommandLineContext.java 12 May 2003 13:26:17 -0000 1.1
+++ CommandLineContext.java 25 May 2003 09:00:30 -0000 1.2
@@ -121,6 +121,7 @@
}
// rely on File to build correct File and URL
File f = new File( contextDir, path );
+ if (!f.exists()) return null;
return f.toURL();
}