You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Hendrik Brummermann (JIRA)" <ji...@apache.org> on 2013/01/20 00:00:12 UTC
[jira] [Updated] (BCEL-170) Type.getArgumentTypes() throws
ClassFormatException: Invalid method signature: >;)
[ https://issues.apache.org/jira/browse/BCEL-170?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Hendrik Brummermann updated BCEL-170:
-------------------------------------
Description:
{code:java}
for (Attribute attribute : method.getAttributes()) {
if (attribute instanceof Signature) {
Signature sig = (Signature) attribute;
System.out.println("Sig: " + sig.getSignature());
System.out.println("Ret: " + Type.getReturnType(sig.getSignature()));
System.out.println("Prm: " + Type.getArgumentTypes(sig.getSignature()));
}
}
{code}
{code}
Input: public SampleReturn<SampleMethodReturnType>
method
(SampleMethodParameter<SampleMethodParameterType> param1) {
...
}
{code}
Output:
{code}
Sig: (Lnet/sf/sample/SampleMethodParameter<Lnet/sf/sample/SampleMethodParameterType;>;)Lnet/sf/sample/SampleReturn<Lnet/sf/plugfy/sample/SampleMethodReturnType;>;
Ret: net.sf.sample.SampleReturn<Lnet.sf.sample.SampleMethodReturnType
org.apache.bcel.classfile.ClassFormatException: Invalid method signature: >;)Lnet/sf/sample/SampleReturn<Lnet/sf/sample/SampleMethodReturnType;>;
at org.apache.bcel.classfile.Utility.typeOfSignature(Utility.java:978)
at org.apache.bcel.generic.Type.getType(Type.java:169)
at org.apache.bcel.generic.Type.getArgumentTypes(Type.java:230)
{code}
was:
for (Attribute attribute : method.getAttributes()) {
if (attribute instanceof Signature) {
Signature sig = (Signature) attribute;
System.out.println("Sig: " + sig.getSignature());
System.out.println("Ret: " + Type.getReturnType(sig.getSignature()));
System.out.println("Prm: " + Type.getArgumentTypes(sig.getSignature()));
}
}
Input: public SampleReturn<SampleMethodReturnType>
method
(SampleMethodParameter<SampleMethodParameterType> param1) {
...
}
Output:
Sig: (Lnet/sf/sample/SampleMethodParameter<Lnet/sf/sample/SampleMethodParameterType;>;)Lnet/sf/sample/SampleReturn<Lnet/sf/plugfy/sample/SampleMethodReturnType;>;
Ret: net.sf.sample.SampleReturn<Lnet.sf.sample.SampleMethodReturnType
org.apache.bcel.classfile.ClassFormatException: Invalid method signature: >;)Lnet/sf/sample/SampleReturn<Lnet/sf/sample/SampleMethodReturnType;>;
at org.apache.bcel.classfile.Utility.typeOfSignature(Utility.java:978)
at org.apache.bcel.generic.Type.getType(Type.java:169)
at org.apache.bcel.generic.Type.getArgumentTypes(Type.java:230)
> Type.getArgumentTypes() throws ClassFormatException: Invalid method signature: >;)
> ----------------------------------------------------------------------------------
>
> Key: BCEL-170
> URL: https://issues.apache.org/jira/browse/BCEL-170
> Project: Commons BCEL
> Issue Type: Bug
> Components: Main
> Affects Versions: 5.1, 5.2
> Reporter: Hendrik Brummermann
>
> {code:java}
> for (Attribute attribute : method.getAttributes()) {
> if (attribute instanceof Signature) {
> Signature sig = (Signature) attribute;
> System.out.println("Sig: " + sig.getSignature());
> System.out.println("Ret: " + Type.getReturnType(sig.getSignature()));
> System.out.println("Prm: " + Type.getArgumentTypes(sig.getSignature()));
> }
> }
> {code}
> {code}
> Input: public SampleReturn<SampleMethodReturnType>
> method
> (SampleMethodParameter<SampleMethodParameterType> param1) {
> ...
> }
> {code}
> Output:
> {code}
> Sig: (Lnet/sf/sample/SampleMethodParameter<Lnet/sf/sample/SampleMethodParameterType;>;)Lnet/sf/sample/SampleReturn<Lnet/sf/plugfy/sample/SampleMethodReturnType;>;
> Ret: net.sf.sample.SampleReturn<Lnet.sf.sample.SampleMethodReturnType
> org.apache.bcel.classfile.ClassFormatException: Invalid method signature: >;)Lnet/sf/sample/SampleReturn<Lnet/sf/sample/SampleMethodReturnType;>;
> at org.apache.bcel.classfile.Utility.typeOfSignature(Utility.java:978)
> at org.apache.bcel.generic.Type.getType(Type.java:169)
> at org.apache.bcel.generic.Type.getArgumentTypes(Type.java:230)
> {code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira