From: wisberg Date: Tue, 4 Mar 2003 04:37:22 +0000 (+0000) Subject: ignoring case in detecting jar/zip suffixes X-Git-Tag: v1_1_0_RC1~69 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=55f3ff47ea2fd979cd2d61790f85cbba5ba7dc40;p=aspectj.git ignoring case in detecting jar/zip suffixes --- 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 */