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 2022/08/13 21:18:09 UTC

[GitHub] [commons-bcel] kriegaex opened a new pull request, #139: Improve condy (constant dynamic) support

kriegaex opened a new pull request, #139:
URL: https://github.com/apache/commons-bcel/pull/139

   Fixes https://issues.apache.org/jira/browse/BCEL-362.
   
   There was a problem when processing JaCoCo-instrumented code with BCEL, e.g. when passing it through example class `JasminVisitor`, causing
   
   ```text
   java.lang.ClassCastException: class org.apache.bcel.classfile.ConstantMethodref cannot be cast to class org.apache.bcel.classfile.ConstantClass (org.apache.bcel.classfile.ConstantMethodref and org.apache.bcel.classfile.ConstantClass are in unnamed module of loader 'app')
       at org.apache.bcel.generic.ConstantPoolGen.<init>(ConstantPoolGen.java:153)
       at org.apache.bcel.generic.ConstantPoolGen.<init>(ConstantPoolGen.java:211)
       at de.example.JasminVisitor.<init>(JasminVisitor.java:70)
   ```
   


-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@commons.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [commons-bcel] codecov-commenter commented on pull request #139: Improve condy (constant dynamic) support

Posted by GitBox <gi...@apache.org>.
codecov-commenter commented on PR #139:
URL: https://github.com/apache/commons-bcel/pull/139#issuecomment-1214225216

   # [Codecov](https://codecov.io/gh/apache/commons-bcel/pull/139?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#139](https://codecov.io/gh/apache/commons-bcel/pull/139?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (bce91f6) into [master](https://codecov.io/gh/apache/commons-bcel/commit/8b0b16884064dc51b58ad4c28e41e7fbef90be97?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (8b0b168) will **decrease** coverage by `0.00%`.
   > The diff coverage is `0.00%`.
   
   ```diff
   @@             Coverage Diff              @@
   ##             master     #139      +/-   ##
   ============================================
   - Coverage     44.08%   44.08%   -0.01%     
   - Complexity     2521     2522       +1     
   ============================================
     Files           362      362              
     Lines         16322    16327       +5     
     Branches       2126     2127       +1     
   ============================================
   + Hits           7195     7197       +2     
   - Misses         8398     8401       +3     
     Partials        729      729              
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/commons-bcel/pull/139?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [...n/java/org/apache/bcel/classfile/ConstantPool.java](https://codecov.io/gh/apache/commons-bcel/pull/139/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2JjZWwvY2xhc3NmaWxlL0NvbnN0YW50UG9vbC5qYXZh) | `64.66% <0.00%> (-2.01%)` | :arrow_down: |
   | [.../java/org/apache/bcel/generic/ConstantPoolGen.java](https://codecov.io/gh/apache/commons-bcel/pull/139/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2JjZWwvZ2VuZXJpYy9Db25zdGFudFBvb2xHZW4uamF2YQ==) | `68.29% <0.00%> (-0.48%)` | :arrow_down: |
   | [src/main/java/org/apache/bcel/util/Class2HTML.java](https://codecov.io/gh/apache/commons-bcel/pull/139/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2JjZWwvdXRpbC9DbGFzczJIVE1MLmphdmE=) | `53.19% <0.00%> (-0.50%)` | :arrow_down: |
   | [src/main/java/org/apache/bcel/Repository.java](https://codecov.io/gh/apache/commons-bcel/pull/139/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2JjZWwvUmVwb3NpdG9yeS5qYXZh) | `14.28% <0.00%> (ø)` | |
   | [src/main/java/org/apache/bcel/util/CodeHTML.java](https://codecov.io/gh/apache/commons-bcel/pull/139/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2JjZWwvdXRpbC9Db2RlSFRNTC5qYXZh) | `50.17% <0.00%> (ø)` | |
   | [src/main/java/org/apache/bcel/util/MethodHTML.java](https://codecov.io/gh/apache/commons-bcel/pull/139/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2JjZWwvdXRpbC9NZXRob2RIVE1MLmphdmE=) | `56.06% <0.00%> (ø)` | |
   | [...c/main/java/org/apache/bcel/util/ConstantHTML.java](https://codecov.io/gh/apache/commons-bcel/pull/139/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2JjZWwvdXRpbC9Db25zdGFudEhUTUwuamF2YQ==) | `95.04% <0.00%> (ø)` | |
   | [.../main/java/org/apache/bcel/util/AttributeHTML.java](https://codecov.io/gh/apache/commons-bcel/pull/139/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2JjZWwvdXRpbC9BdHRyaWJ1dGVIVE1MLmphdmE=) | `56.38% <0.00%> (ø)` | |
   | [src/main/java/org/apache/bcel/util/ClassPath.java](https://codecov.io/gh/apache/commons-bcel/pull/139/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2JjZWwvdXRpbC9DbGFzc1BhdGguamF2YQ==) | `42.63% <0.00%> (+1.16%)` | :arrow_up: |
   
   :mega: We’re building smart automated test selection to slash your CI/CD build times. [Learn more](https://about.codecov.io/iterative-testing/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   


-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@commons.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [commons-bcel] kriegaex commented on pull request #139: Improve condy (constant dynamic) support

Posted by GitBox <gi...@apache.org>.
kriegaex commented on PR #139:
URL: https://github.com/apache/commons-bcel/pull/139#issuecomment-1214368007

   So, instead of being happy that someone provides a PR at all after having begged the contributors for a bugfix, and writing a test by yourself, now the PR I was asked for before is not good enough still, and I should provide a test, too? That is quite an interesting experience with this project. What exactly do maintainers do around here? Simply wait for users to do everything? Actually, I do have a test, but it requires JaCoCo in my Maven project. I checked whether you have a Maven Invoker test suite, but you do not. So there is no easy way to provide a test without digging into BCEL's intestines and writing a separate test, similar to the ones you already have with extra precompiled class files that can be processed by BCEL. I do not have the cycles for that. Actually, I only wanted to fix a problem in AspectJ, asking the BCEL team for help. I got none, so I had to fix it myself in AspectJ. I was even nice enough to provide a bugfix for the upstream project, and now that is not 
 good enough. Uh-huh.


-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@commons.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [commons-bcel] garydgregory merged pull request #139: Improve condy (constant dynamic) support

Posted by GitBox <gi...@apache.org>.
garydgregory merged PR #139:
URL: https://github.com/apache/commons-bcel/pull/139


-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@commons.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [commons-bcel] garydgregory commented on pull request #139: Improve condy (constant dynamic) support

Posted by GitBox <gi...@apache.org>.
garydgregory commented on PR #139:
URL: https://github.com/apache/commons-bcel/pull/139#issuecomment-1214350317

   Hello @kriegaex,
   
   Thank you for you PR! 
   
   You'll need update this PR with some kind of test, otherwise, this is a regression waiting to happen. It could be as simple as parsing a class file that fails without applying the "main" side for the PR. The test should reflect what you say happens, namely:
   ```
   java.lang.ClassCastException: class org.apache.bcel.classfile.ConstantMethodref cannot be cast to class org.apache.bcel.classfile.ConstantClass (org.apache.bcel.classfile.ConstantMethodref and org.apache.bcel.classfile.ConstantClass are in unnamed module of loader 'app')
       at org.apache.bcel.generic.ConstantPoolGen.<init>(ConstantPoolGen.java:153)
       at org.apache.bcel.generic.ConstantPoolGen.<init>(ConstantPoolGen.java:211)
       ...
   ```
   
   In fact, that is often what I do to validate a PR: 
   - Apply the test side of the PR, 
   - Watch the test fail, 
   - Apply the main side of the PR, and 
   - Watch the test pass.
   - Merge the PR
   
   Thank you again for helping out  :smile:


-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@commons.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [commons-bcel] kriegaex commented on pull request #139: Improve condy (constant dynamic) support

Posted by GitBox <gi...@apache.org>.
kriegaex commented on PR #139:
URL: https://github.com/apache/commons-bcel/pull/139#issuecomment-1214718066

   FWIW, I added a test case - not with the goal to increase coverage but to prevent future regressions. Reverse the two commits, and the test before the fix will fail.


-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@commons.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org