geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pmcma...@apache.org
Subject svn commit: r546897 - /geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.jasper/src/org/apache/geronimo/j2g/jasper/JspCompiler.java
Date Wed, 13 Jun 2007 14:48:16 GMT
Author: pmcmahan
Date: Wed Jun 13 07:48:15 2007
New Revision: 546897

URL: http://svn.apache.org/viewvc?view=rev&rev=546897
Log:
GERONIMO-3239 check for invalid paths in J2G's JSPCompiler.  Patch provided by Erik Craig.

Modified:
    geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.jasper/src/org/apache/geronimo/j2g/jasper/JspCompiler.java

Modified: geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.jasper/src/org/apache/geronimo/j2g/jasper/JspCompiler.java
URL: http://svn.apache.org/viewvc/geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.jasper/src/org/apache/geronimo/j2g/jasper/JspCompiler.java?view=diff&rev=546897&r1=546896&r2=546897
==============================================================================
--- geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.jasper/src/org/apache/geronimo/j2g/jasper/JspCompiler.java
(original)
+++ geronimo/sandbox/j2g/plugins/org.apache.geronimo.j2g.jasper/src/org/apache/geronimo/j2g/jasper/JspCompiler.java
Wed Jun 13 07:48:15 2007
@@ -83,12 +83,14 @@
 	private void searchJspFiles(String base, File file) throws FatalToolException {
 		if (file.isDirectory()) {
 			File[] fileList = file.listFiles(jspFilesFilter);
+			if (base.equals(""))
+				base = ".";
 			for (int i = 0; i < fileList.length; i++) {
 				if (fileList[i].isDirectory()) {
-					searchJspFiles("." + base + File.separator + fileList[i].getName(), fileList[i]);
+					searchJspFiles(base + File.separator + fileList[i].getName(), fileList[i]);
 				}
 				else {
-					jspCompiler.setJspFiles("." + base + File.separator + fileList[i].getName());
+					jspCompiler.setJspFiles(base + File.separator + fileList[i].getName());
 				}
 			}
 		}



Mime
View raw message