You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by GitBox <gi...@apache.org> on 2019/10/11 19:16:50 UTC

[GitHub] [commons-bcel] garydgregory commented on a change in pull request #34: fix BCEL-329 attribute duplication

garydgregory commented on a change in pull request #34: fix BCEL-329 attribute duplication
URL: https://github.com/apache/commons-bcel/pull/34#discussion_r334139224
 
 

 ##########
 File path: src/main/java/org/apache/bcel/generic/MethodGen.java
 ##########
 @@ -599,27 +599,33 @@ public void removeCodeAttributes() {
     /**
      * @since 6.0
      */
-    public void addAnnotationsAsAttribute(final ConstantPoolGen cp) {
-          final Attribute[] attrs = AnnotationEntryGen.getAnnotationAttributes(cp, super.getAnnotationEntries());
+    public Attribute[] addAnnotationsAsAttribute(final ConstantPoolGen cp) {
 
 Review comment:
   -1: You cannot change a return type and maintain binary compatibility.
   Run `mvn clean install -DskipTests japicmp:cmp` and see the compatibility break:
   ```
   [INFO] ------------------------------------------------------------------------
   [INFO] BUILD FAILURE
   [INFO] ------------------------------------------------------------------------
   [INFO] Total time:  23.786 s
   [INFO] Finished at: 2019-10-11T15:14:52-04:00
   [INFO] ------------------------------------------------------------------------
   [ERROR] Failed to execute goal com.github.siom79.japicmp:japicmp-maven-plugin:0.14.1:cmp (default-cli) on project bcel: There is at least one incompatibility: org.apache.bcel.generic.MethodGen.addAnnotationsAsAttribute(org.apache.bcel.generic.ConstantPoolGen):METHOD_RETURN_TYPE_CHANGED,org.apache.bcel.generic.MethodGen.addParameterAnnotationsAsAttribute(org.apache.bcel.generic.ConstantPoolGen):METHOD_RETURN_TYPE_CHANGED -> [Help 1]
   [ERROR]
   ```
   You need a _new_ API.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services