[JBoss JIRA] (JASSIST-128) GetRefClasses() for anonymous inner classes incorrect
by Shigeru Chiba (JIRA)
[ https://issues.jboss.org/browse/JASSIST-128?page=com.atlassian.jira.plugi... ]
Shigeru Chiba closed JASSIST-128.
---------------------------------
> GetRefClasses() for anonymous inner classes incorrect
> -----------------------------------------------------
>
> Key: JASSIST-128
> URL: https://issues.jboss.org/browse/JASSIST-128
> Project: Javassist
> Issue Type: Bug
> Affects Versions: 3.12.0.GA
> Reporter: Jesper Pedersen
> Assignee: Shigeru Chiba
> Fix For: 3.14.0.GA
>
>
> When getting the referenced classes from an anonymous inner class it incorrectly list a .{Name} reference:
> CLZ=org.jboss.shrinkwrap.impl.base.container.ContainerBase$1
> Collection c = ctClz.getRefClasses();
> R=org.jboss.shrinkwrap.impl.base.container.ContainerBase$1
> R=org.jboss.shrinkwrap.impl.base.container.ContainerBase
> R=org.jboss.shrinkwrap.impl.base.container.ContainerBase.1 <-- incorrect
--
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
12 years, 5 months
[JBoss JIRA] (JASSIST-125) Compilation fails with "javassist.bytecode.BadBytecode: jsr at 406" WebLogic 10.3 JTA data source class
by Shigeru Chiba (JIRA)
[ https://issues.jboss.org/browse/JASSIST-125?page=com.atlassian.jira.plugi... ]
Shigeru Chiba closed JASSIST-125.
---------------------------------
> Compilation fails with "javassist.bytecode.BadBytecode: jsr at 406" WebLogic 10.3 JTA data source class
> -------------------------------------------------------------------------------------------------------
>
> Key: JASSIST-125
> URL: https://issues.jboss.org/browse/JASSIST-125
> Project: Javassist
> Issue Type: Bug
> Affects Versions: 3.12.0.GA
> Environment: Reproduced on Linux x86 and Windows XP (x86).
> Reporter: Mooky Grand
> Assignee: Shigeru Chiba
> Fix For: 3.13.0.GA
>
>
> Trying to add code at the beginning of the method getConnection in the class weblogic.jdbc.jta.DataSource I got the following error:
> Exception in thread "main" javassist.CannotCompileException: by javassist.bytecode.BadBytecode: jsr at 399
> at javassist.CtBehavior.insertBefore(CtBehavior.java:728)
> at javassist.CtBehavior.insertBefore(CtBehavior.java:685)
> at Test.main(Test.java:26)
> Caused by: javassist.bytecode.BadBytecode: jsr at 399
> at javassist.bytecode.stackmap.Tracer.throwBadBytecode(Tracer.java:144)
> at javassist.bytecode.stackmap.Tracer.visitJSR(Tracer.java:133)
> at javassist.bytecode.stackmap.Tracer.doOpcode148_201(Tracer.java:563)
> at javassist.bytecode.stackmap.Tracer.doOpcode(Tracer.java:101)
> at javassist.bytecode.stackmap.MapMaker.make(MapMaker.java:182)
> at javassist.bytecode.stackmap.MapMaker.traceException(MapMaker.java:213)
> at javassist.bytecode.stackmap.MapMaker.make(MapMaker.java:175)
> at javassist.bytecode.stackmap.MapMaker.make(MapMaker.java:192)
> at javassist.bytecode.stackmap.MapMaker.make(MapMaker.java:141)
> at javassist.bytecode.stackmap.MapMaker.make(MapMaker.java:96)
> at javassist.bytecode.MethodInfo.rebuildStackMap(MethodInfo.java:416)
> at javassist.bytecode.MethodInfo.rebuildStackMapIf6(MethodInfo.java:398)
> at javassist.CtBehavior.insertBefore(CtBehavior.java:719)
> ... 2 more
> I've created a small program that simulates this problem outside the Weblogic container.
> The class can be found inside <Weblogic home>\modules\com.bea.core.datasource6_1.4.0.0.jar.
> And additional dependency which is required in order to load this class (although it is not needed in order to modify the byte codes) is <Weblogic home>\modules\com.bea.core.transaction_2.5.0.0.jar.
> Both of these files are available when installing Weblogic 10.3.
> I suspect this might be some sort of collision with WebLogic's Diagnostic framework. I'm not sure how calls to WLDF are added, but it is possible they were added by some other tool for manipulating byte codes (at compile time), in which case this issue is a bit more interesting (could indicate collisions with certain other AOP tools).
> Just for the sake of pin pointing the source of the problem, I also used AspectJ to add code to the method. It worked fine with no errors.
--
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
12 years, 5 months
[JBoss JIRA] (JASSIST-129) getRefClasses() fails for some of the inner classes defined in java.util
by Shigeru Chiba (JIRA)
[ https://issues.jboss.org/browse/JASSIST-129?page=com.atlassian.jira.plugi... ]
Shigeru Chiba closed JASSIST-129.
---------------------------------
> getRefClasses() fails for some of the inner classes defined in java.util
> ------------------------------------------------------------------------
>
> Key: JASSIST-129
> URL: https://issues.jboss.org/browse/JASSIST-129
> Project: Javassist
> Issue Type: Bug
> Affects Versions: 3.13.0.GA
> Reporter: Maciej Kokocinski
> Assignee: Shigeru Chiba
> Fix For: 3.14.0.GA
>
>
> CtClass.getRefClasses() reports not existing classes in some cases.
> One out of many examples is "java.util.LinkedList$DescendingIterator". getRefClasses() for this class returns, as one of the resulting list elements, "istItr" which is obviously wrong as there is no such class.
> There is a field inside this class named itr of type 'java.util.LinkedList$ListItr". If we get fieldInfo for this field its descriptor is "Ljava/util/LinkedList$ListItr;", however if we take its SignatureAttribute, then its signature is "Ljava/util/LinkedList<TE;>.ListItr;". When this string is parsed during AttributeInfo.renameClass(List, ClassMap) then a class named "istItr" is 'found'.
--
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
12 years, 5 months
[JBoss JIRA] (JASSIST-123) Explicit class import support for compiler (not whole packages)
by Shigeru Chiba (JIRA)
[ https://issues.jboss.org/browse/JASSIST-123?page=com.atlassian.jira.plugi... ]
Shigeru Chiba closed JASSIST-123.
---------------------------------
> Explicit class import support for compiler (not whole packages)
> ---------------------------------------------------------------
>
> Key: JASSIST-123
> URL: https://issues.jboss.org/browse/JASSIST-123
> Project: Javassist
> Issue Type: Patch
> Reporter: Ivan Prisiazhnyy
> Assignee: Shigeru Chiba
> Labels: compiler, import
> Fix For: 3.14.0.GA
>
>
> This is patch for MemberResolver class for Javassist 3.12.GA
> It adds support for compiler to understand importing of certain classes in packages, not the whole packages.
> With this patch the following code will do its job:
> ClassPool x = ClassPool.getDefault();
> x.importPackage("java.io.File");
> Patch it self:
> *** MemberResolver.java 2010-04-04 02:21:30.000000000 +0300
> --- MemberResolver.java 2010-06-10 14:38:03.000000000 +0300
> ***************
> *** 429,434 ****
> --- 429,445 ----
> }
> catch (NotFoundException e) {
> classPool.recordInvalidClassName(fqName);
> +
> + try {
> + if (pac.endsWith(orgName)) {
> + CtClass cc = classPool.get(pac);
> + // if the class is found,
> + classPool.recordInvalidClassName(orgName);
> + return cc;
> + }
> + } catch (NotFoundException ee) {
> + classPool.recordInvalidClassName(pac);
> + }
> }
> }
> }
--
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
12 years, 5 months
[JBoss JIRA] (JASSIST-145) erroneous "bad array type for AALOAD: null" when verifying
by Shigeru Chiba (JIRA)
[ https://issues.jboss.org/browse/JASSIST-145?page=com.atlassian.jira.plugi... ]
Shigeru Chiba closed JASSIST-145.
---------------------------------
> erroneous "bad array type for AALOAD: null" when verifying
> ----------------------------------------------------------
>
> Key: JASSIST-145
> URL: https://issues.jboss.org/browse/JASSIST-145
> Project: Javassist
> Issue Type: Bug
> Affects Versions: 3.15.0-GA
> Reporter: Shigeru Chiba
> Assignee: Shigeru Chiba
> Fix For: 3.16.0-GA
>
>
> (reported by Johannes Schindelin)
> When verifying bytecode compiled for Java 1.6+ where we need to provide a
> StackMapTable attribute which we verify ourselves first, the sequence
> ACONST_NULL
> ASTORE_0
> ...
> ALOAD_0
> ICONST_0
> AALOAD
> triggers the verifier to add NullType as an equivalent type for the
> ArrayType. Since that code might be unreachable after instrumenting or the
> local variable might have been set otherwise before jumping back to this
> code, we really need ArrayType's isNullType() method to report the correct
> result.
--
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
12 years, 5 months