commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mark Roberts (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (BCEL-262) FieldOrMethod.getClassName(ConstantPoolGen cpg) is deprecated
Date Wed, 22 Jun 2016 16:22:58 GMT

    [ https://issues.apache.org/jira/browse/BCEL-262?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15344655#comment-15344655
] 

Mark Roberts commented on BCEL-262:
-----------------------------------

I don't understand the comment either.  It was added via "r190050 | dbrosius | 2005-06-10
17:47:39 -0700 (Fri, 10 Jun 2005) | 9 lines".  As noted above it is just plain wrong for the
invoke instruction.  In fact, it looks like I did not pass along my complete fix. I have attached
a diff file with the corrections. 

> FieldOrMethod.getClassName(ConstantPoolGen cpg) is deprecated
> -------------------------------------------------------------
>
>                 Key: BCEL-262
>                 URL: https://issues.apache.org/jira/browse/BCEL-262
>             Project: Commons BCEL
>          Issue Type: Bug
>            Reporter: Sebb
>
> The method FieldOrMethod.getClassName(ConstantPoolGen cpg) is deprecated because it can
return java.lang.Object for arrays.
> Now the method is defined in the superclass for FieldInstructions and InvokeInstructions.
> In the case of InvokeInstructions, can these ever reference an Array?
> If not, then the method could be overridden in the InvokeInstruction class.
> This new method would throw an unchecked Exception if detects an Array.
> This would change the behaviour of the method for subclasses of InvokeInstruction, but
they would not need to be updated.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message