gtoison commented on code in PR #254:
URL: https://github.com/apache/commons-bcel/pull/254#discussion_r1441434251
##########
src/main/java/org/apache/bcel/generic/LDC.java:
##########
@@ -109,6 +111,9 @@ public Object getValue(final ConstantPoolGen cpg) {
final int nameIndex = ((org.apache.bcel.classfile.ConstantClass)
c).getNameIndex();
c = cpg.getConstantPool().getConstant(nameIndex);
return
Type.getType(Type.internalTypeNameToSignature(((org.apache.bcel.classfile.ConstantUtf8)
c).getBytes()));
+ case org.apache.bcel.Const.CONSTANT_Dynamic:
+ // Really not sure what to return here, maybe a BootstrapMethod
instance but how do we get it?
+ return c;
Review Comment:
Yes, I was wondering if there's already something in BCEL to account for
values known at runtime.
For other constant types `LDC.getValue()` returns the actual value (or a
`Type` in case it's a class), so returning the constant itself might be a bit
misleading here
--
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]