You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@groovy.apache.org by pa...@apache.org on 2016/07/11 10:05:50 UTC

groovy git commit: minor refactor: include return type for modified methods in japicmp reports

Repository: groovy
Updated Branches:
  refs/heads/master 43140c893 -> cb65377d3


minor refactor: include return type for modified methods in japicmp reports


Project: http://git-wip-us.apache.org/repos/asf/groovy/repo
Commit: http://git-wip-us.apache.org/repos/asf/groovy/commit/cb65377d
Tree: http://git-wip-us.apache.org/repos/asf/groovy/tree/cb65377d
Diff: http://git-wip-us.apache.org/repos/asf/groovy/diff/cb65377d

Branch: refs/heads/master
Commit: cb65377d326e2997ca6a3c480367ed10b23bbb1e
Parents: 43140c8
Author: paulk <pa...@asert.com.au>
Authored: Mon Jul 11 20:05:38 2016 +1000
Committer: paulk <pa...@asert.com.au>
Committed: Mon Jul 11 20:05:38 2016 +1000

----------------------------------------------------------------------
 gradle/binarycompatibility.gradle | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/groovy/blob/cb65377d/gradle/binarycompatibility.gradle
----------------------------------------------------------------------
diff --git a/gradle/binarycompatibility.gradle b/gradle/binarycompatibility.gradle
index 0847d72..b7774a9 100644
--- a/gradle/binarycompatibility.gradle
+++ b/gradle/binarycompatibility.gradle
@@ -54,13 +54,17 @@ if (JavaVersion.current().isJava7Compatible()) {
         "${Modifier.toString(classOrMethod.get()?.modifiers)} ${classOrMethod.get()?.longName}"
     }
 
+    def prettyPrintMethodWithReturnType = { method ->
+        "${Modifier.toString(method.get()?.modifiers)} ${method.get()?.returnType.name} ${method.get()?.name}${javassist.bytecode.Descriptor.toString(method.get()?.signature)}"
+    }
+
     def reportGenerator = { model ->
         outputProcessor {
 
             def skipClass = { c ->
                 c.fullyQualifiedName =~ /\$[0-9]+$/ || // skip AIC
                         c.fullyQualifiedName.startsWith('org.codehaus.groovy.runtime.dgm$') ||
-//                        c.fullyQualifiedName.startsWith('groovyjarjar') ||
+                        c.fullyQualifiedName.startsWith('groovyjarjar') ||
                         c.fullyQualifiedName.contains('_closure')
             }
             def skipMethod = { c, m -> skipClass(c) || m.name =~ /access\$[0-9]+/ }
@@ -90,7 +94,7 @@ if (JavaVersion.current().isJava7Compatible()) {
             modifiedMethod { c, m ->
                 if (!skipMethod(c, m)) {
                     violations[c.fullyQualifiedName].warning << """<p>Method ${m.name} has been modified</p>
-<p>From <pre>${prettyPrint(m.oldMethod)}</pre> to <pre>${prettyPrint(m.newMethod)}</pre></p>"""
+<p>From <pre>${prettyPrintMethodWithReturnType(m.oldMethod)}</pre> to <pre>${prettyPrintMethodWithReturnType(m.newMethod)}</pre></p>"""
                 }
             }