/hg/MauveTestCoverage: Fixed issue with virtual methods which we...

ptisnovs at icedtea.classpath.org ptisnovs at icedtea.classpath.org
Thu Aug 23 05:04:12 PDT 2012


changeset 7cd98b5c3440 in /hg/MauveTestCoverage
details: http://icedtea.classpath.org/hg/MauveTestCoverage?cmd=changeset;node=7cd98b5c3440
author: Pavel Tisnovsky <ptisnovs at redhat.com>
date: Thu Aug 23 14:06:33 2012 +0200

	Fixed issue with virtual methods which were included
	in the report (which was wrong).


diffstat:

 ChangeLog                   |   6 ++++++
 src/PrintPublicMethods.java |  10 +++++++---
 2 files changed, 13 insertions(+), 3 deletions(-)

diffs (33 lines):

diff -r 50271ecf8de5 -r 7cd98b5c3440 ChangeLog
--- a/ChangeLog	Mon Aug 20 17:32:13 2012 +0200
+++ b/ChangeLog	Thu Aug 23 14:06:33 2012 +0200
@@ -1,3 +1,9 @@
+2012-08-23  Pavel Tisnovsky  <ptisnovs at redhat.com>
+
+	* src/PrintPublicMethods.java:
+	Fixed issue with virtual methods which were included
+	in the report (which was wrong).
+
 2012-08-20  Pavel Tisnovsky  <ptisnovs at redhat.com>
 
 	* src/ReportGenerator.java:
diff -r 50271ecf8de5 -r 7cd98b5c3440 src/PrintPublicMethods.java
--- a/src/PrintPublicMethods.java	Mon Aug 20 17:32:13 2012 +0200
+++ b/src/PrintPublicMethods.java	Thu Aug 23 14:06:33 2012 +0200
@@ -111,9 +111,13 @@
         final String[] prefixes = new String[] {"public", "final", "native", "synchronized", "static"};
         String methodNameString = methodName;
         // remove all prefixes
-        for (String prefix : prefixes) {
-            // remove one prefix
-            methodNameString = removePrefix(methodNameString, prefix);
+        for (int i = 0; i < prefixes.length; i++) {
+            // the prefixes can be read in semi-random order so we
+            // need to cycle through them several time
+            for (String prefix : prefixes) {
+                // remove one prefix
+                methodNameString = removePrefix(methodNameString, prefix);
+            }
         }
         // "throws" declaration should be removed too
         return removeThrowsFromDeclaration(methodNameString);



More information about the distro-pkg-dev mailing list