Skip to content
This repository was archived by the owner on Aug 31, 2018. It is now read-only.

Commit f89a979

Browse files
Updated the URL Normalize logic
1 parent 577e703 commit f89a979

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

jsftemplating/src/main/java/com/sun/jsftemplating/util/fileStreamer/ResourceContentSource.java

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -122,11 +122,8 @@ public static String normalize(String origPath) {
122122
// Normalize it...
123123
if ((path != null) && (path.length() > 0)) {
124124
path = path.replace('\\', '/');
125-
// Remove leading '/' chars
126-
while ((path.length() > 0) && (path.charAt(0) == '/')) {
127-
path = path.substring(1);
128-
}
129-
// Replace all double "//" with "/"
125+
126+
// Replace all double "//" with "/"
130127
while (path.indexOf("//") != -1) {
131128
path = path.replace("//", "/");
132129
}

0 commit comments

Comments
 (0)