[Jsptest-svn-commits] SF.net SVN: jsptest: [177] branches/multispecsupport.1.2/jsptest-generic/ js
Status: Alpha
Brought to you by:
lkoskela
From: <gdi...@us...> - 2007-10-05 18:34:14
|
Revision: 177 http://jsptest.svn.sourceforge.net/jsptest/?rev=177&view=rev Author: gdinwiddie Date: 2007-10-05 11:34:11 -0700 (Fri, 05 Oct 2007) Log Message: ----------- initial work toward getting jsptest to work for JSP 1.2 spec. So far the strategy has been to duplicate things for JSP 2.0 and hack them until the tests pass. The thought is that the duplication can be removed afterwards. Modified Paths: -------------- branches/multispecsupport.1.2/jsptest-generic/jsptest-common/src/main/java/net/sf/jsptest/utils/Path.java Modified: branches/multispecsupport.1.2/jsptest-generic/jsptest-common/src/main/java/net/sf/jsptest/utils/Path.java =================================================================== --- branches/multispecsupport.1.2/jsptest-generic/jsptest-common/src/main/java/net/sf/jsptest/utils/Path.java 2007-10-05 18:34:06 UTC (rev 176) +++ branches/multispecsupport.1.2/jsptest-generic/jsptest-common/src/main/java/net/sf/jsptest/utils/Path.java 2007-10-05 18:34:11 UTC (rev 177) @@ -61,11 +61,17 @@ String prefix = "jar:file:"; if (url.startsWith(prefix)) { String file = url.substring(prefix.length()); - if (file.contains("!")) { + if (stringContains(file, "!")) { file = file.substring(0, file.indexOf('!')); } add(new File(file)); } } + private boolean stringContains(String string, String expected) { + //The method String.contains() doesn't exist in Java 1.4 + //return string.contains(expected); + return string.indexOf(expected) >= 0; + } + } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |