aboutsummaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
authorwisberg <wisberg>2003-03-04 04:37:22 +0000
committerwisberg <wisberg>2003-03-04 04:37:22 +0000
commit55f3ff47ea2fd979cd2d61790f85cbba5ba7dc40 (patch)
treeec7eeede2d6e6cf6d9363c5fbb7f658dd594803e /util
parentfa1b7922b317e1e95d22ad68c74253df28995692 (diff)
downloadaspectj-55f3ff47ea2fd979cd2d61790f85cbba5ba7dc40.tar.gz
aspectj-55f3ff47ea2fd979cd2d61790f85cbba5ba7dc40.zip
ignoring case in detecting jar/zip suffixes
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 */