# HG changeset patch # User Pavel Tisnovsky # Date 1345723593 -7200 # Node ID 7cd98b5c344012be5af3c9e008c14e6f9efa3cf7 # Parent 50271ecf8de583a739c91a13c456f67346614eae Fixed issue with virtual methods which were included in the report (which was wrong). 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 + + * src/PrintPublicMethods.java: + Fixed issue with virtual methods which were included + in the report (which was wrong). + 2012-08-20 Pavel Tisnovsky * 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);