[jboss-jira] [JBoss JIRA] (JASSIST-209) Nested classes read from ClassMemberValue cannot be loaded

Shigeru Chiba (JIRA) issues at jboss.org
Thu Nov 20 10:47:39 EST 2014


     [ https://issues.jboss.org/browse/JASSIST-209?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Shigeru Chiba closed JASSIST-209.
---------------------------------
    Fix Version/s: 3.19.0-GA
       Resolution: Done


> Nested classes read from ClassMemberValue cannot be loaded
> ----------------------------------------------------------
>
>                 Key: JASSIST-209
>                 URL: https://issues.jboss.org/browse/JASSIST-209
>             Project: Javassist
>          Issue Type: Bug
>    Affects Versions: 3.18.0-GA, 3.18.1-GA
>            Reporter: Ben Romberg
>            Assignee: Shigeru Chiba
>             Fix For: 3.19.0-GA
>
>
> I'm trying to upgrade Javassist in my project from version 3.16.1 to 3.18.0. I'm using the ClassMemberValue to load the (String) class-name of an annotation value, in order to load the class with Javassist using ClassPool.get(...).
> In 3.16.1, the returned class-name String for nested classes contained the $-sign, as in package.ParentClass$NestedClass, which didn't have any issues using the String with ClassPool.get(...).
> In 3.18.0 however, the returned class-name String for nested classes changed to a pure dot-notation, as in package.ParentClass.NestedClass, which cannot be used with ClassPool.get(...) anymore, as Javassist tries to load the class-file from package/ParentClass/NestedClass.class instead of package/ParentClass$NestedClass.class.
> I don't see any way to work around the issue without hacking into internal API, as the class-name String is the only way to get the annotation value. As this is a generic class (and not always a nested class), I also cannot simply replace the last dot with a $-sign.



--
This message was sent by Atlassian JIRA
(v6.3.8#6338)


More information about the jboss-jira mailing list