summaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
Diffstat (limited to 'util')
-rw-r--r--util/src/org/aspectj/util/FileUtil.java10
1 files changed, 7 insertions, 3 deletions
diff --git a/util/src/org/aspectj/util/FileUtil.java b/util/src/org/aspectj/util/FileUtil.java
index 939329eb3..35405ce59 100644
--- a/util/src/org/aspectj/util/FileUtil.java
+++ b/util/src/org/aspectj/util/FileUtil.java
@@ -55,9 +55,13 @@ public class FileUtil {
/** @return 0 if no zip/jar suffix or 4 otherwise */
public static int zipSuffixLength(String path) {
- return (null == path ? 0
- : path.endsWith(".zip") ? 4
- : path.endsWith(".jar") ? 4 : 0);
+ if ((null != path) && (4 < path.length())){
+ String test = path.substring(path.length()-4).toLowerCase();
+ if (".zip".equals(test) || ".jar".equals(test)) {
+ return 4;
+ }
+ }
+ return 0;
}
/** @return true if file path has a source suffix */