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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to