# HG changeset patch # User Pavel Tisnovsky # Date 1339774388 -7200 # Node ID 7bb9210fb1924b5f83e1374aa09a42de12166424 # Parent 6fb52e29ed2941b4d6e698dd4f6ab1d14483ae75 * Makefile: Fixed issue with too small PermGen space (it's now increased to 128M max). * src/PrintClassList.java: Added filter for public abstract classes. diff -r 6fb52e29ed29 -r 7bb9210fb192 ChangeLog --- a/ChangeLog Fri Jun 01 14:51:50 2012 +0200 +++ b/ChangeLog Fri Jun 15 17:33:08 2012 +0200 @@ -1,3 +1,11 @@ +2012-06-15 Pavel Tisnovsky + + * Makefile: + Fixed issue with too small PermGen space (it's now increased to 128M + max). + * src/PrintClassList.java: + Added filter for public abstract classes. + 2012-06-01 Pavel Tisnovsky * src/ReportGenerator.java: diff -r 6fb52e29ed29 -r 7bb9210fb192 Makefile --- a/Makefile Fri Jun 01 14:51:50 2012 +0200 +++ b/Makefile Fri Jun 15 17:33:08 2012 +0200 @@ -139,7 +139,7 @@ else \ echo "Ok, Jar file $(JARFILE) exists"; \ fi - $(JAVA) -cp $(CLASSDIR) PrintClassList `cat $(PATH_TO_RT_JAR_FILE)` > $(REPORTDIR)/$(ALL_CLASS_LIST) + $(JAVA) -cp $(CLASSDIR) -XX:MaxPermSize=128m PrintClassList `cat $(PATH_TO_RT_JAR_FILE)` > $(REPORTDIR)/$(ALL_CLASS_LIST) gen_report: $(REPORTDIR) cp -u $(TEMPLATEDIR)/index.html $(REPORTDIR) diff -r 6fb52e29ed29 -r 7bb9210fb192 src/PrintClassList.java --- a/src/PrintClassList.java Fri Jun 01 14:51:50 2012 +0200 +++ b/src/PrintClassList.java Fri Jun 15 17:33:08 2012 +0200 @@ -105,7 +105,7 @@ String className = generateClassName(entry.getName()); // only public classes are interesting at this moment // (private classes could not be tested) - if (isPublicClass(className)) { + if (isPublicAndNotAbstractClass(className)) { setOfClassNames.add(className); } } @@ -142,14 +142,14 @@ /** * Returns true if given className represents true class and the class is - * public. + * public and not abstract at the same moment. * * @param className * class name * @return true if className represents true class and the class is public */ @SuppressWarnings("unchecked") - private static boolean isPublicClass(String className) { + private static boolean isPublicAndNotAbstractClass(String className) { try { Class clazz = Class.forName(className); // interfaces are not our job at this moment @@ -161,6 +161,9 @@ if (!Modifier.isPublic(classModifiers)) { return false; } + if (Modifier.isAbstract(classModifiers)) { + return false; + } } catch (ClassNotFoundException e) { // it might happen because jar file could