Mercurial > hg > MauveTestCoverage
changeset 19:7bb9210fb192 draft
* Makefile:
Fixed issue with too small PermGen space (it's now increased to 128M
max).
* src/PrintClassList.java:
Added filter for public abstract classes.
author | Pavel Tisnovsky <ptisnovs@redhat.com> |
---|---|
date | Fri, 15 Jun 2012 17:33:08 +0200 |
parents | 6fb52e29ed29 |
children | 50271ecf8de5 |
files | ChangeLog Makefile src/PrintClassList.java |
diffstat | 3 files changed, 15 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- 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 <ptisnovs@redhat.com> + + * 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 <ptisnovs@redhat.com> * src/ReportGenerator.java:
--- 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)
--- 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