You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Benedikt Ritter (JIRA)" <ji...@apache.org> on 2016/07/02 16:53:11 UTC

[jira] [Resolved] (BCEL-262) InvokeInstruction.getClassName(ConstantPoolGen) should throw an exception when it detects an array

     [ https://issues.apache.org/jira/browse/BCEL-262?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Benedikt Ritter resolved BCEL-262.
----------------------------------
    Resolution: Fixed
      Assignee: Benedikt Ritter

{code}
$ svn ci -m "BCEL-262: InvokeInstruction.getClassName(ConstantPoolGen) should throw an exception when it detects an array. Thanks to Mark Roberts."
Sending        RELEASE-NOTES.txt
Sending        src/changes/changes.xml
Sending        src/main/java/org/apache/bcel/generic/InvokeInstruction.java
Transmitting file data ...done
Committing transaction...
Committed revision 1751083.
{code}

Thank you [~markro] for contributing the patch!

> InvokeInstruction.getClassName(ConstantPoolGen) should throw an exception when it detects an array
> --------------------------------------------------------------------------------------------------
>
>                 Key: BCEL-262
>                 URL: https://issues.apache.org/jira/browse/BCEL-262
>             Project: Commons BCEL
>          Issue Type: Improvement
>            Reporter: Sebb
>            Assignee: Benedikt Ritter
>             Fix For: 6.0
>
>         Attachments: InvokeInstruction.diff
>
>
> 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)