From c1a9241511c5129b1df6aaaaafb00075dd000db0 Mon Sep 17 00:00:00 2001 From: chenxi071990 Date: Mon, 22 Sep 2014 14:22:55 +0800 Subject: [PATCH] bug fix --- src/main/java/haflow/util/ClassHelper.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main/java/haflow/util/ClassHelper.java b/src/main/java/haflow/util/ClassHelper.java index e718c04..407b0b1 100644 --- a/src/main/java/haflow/util/ClassHelper.java +++ b/src/main/java/haflow/util/ClassHelper.java @@ -22,6 +22,7 @@ public class ClassHelper { URLClassLoader classLoader = (URLClassLoader) Thread .currentThread().getContextClassLoader(); URL[] urls = classLoader.getURLs(); + for (URL url : urls) { if (url.getProtocol().equals("file")) { File file = new File(url.getFile()); @@ -68,8 +69,9 @@ public class ClassHelper { .replace("/", "."); classNames.add(className); } - }else if(filePath.endsWith(".jar")){ - classNames.addAll(getClassNameFromJar(packageName, true, new File(filePath))); + } else if (filePath.endsWith(".jar")) { + classNames.addAll(getClassNameFromJar(packageName, true, + new File(filePath))); } } }