Uploaded image for project: 'JBoss Enterprise Application Platform 6'
  1. JBoss Enterprise Application Platform 6
  2. JBPAPP6-1075

Weld 1.1 integration test TypeVariableResolverTest fails on ER7 with JDK7

This issue belongs to an archived project. You can view it, but you can't modify it. Learn more

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: EAP 6.0.0 ER 7, EAP 6.0.0
    • Fix Version/s: EAP 6.0.1 ER 3
    • Component/s: Other
    • Labels:
      None
    • Environment:

      EAP 6.0.0.ER7, Weld 1.1.8.Final, Oracle JDK 1.7.0_04

    • Affects:
      Release Notes

      Description

      One integration test fails when run on JDK7, while it runs OK on JDK6:

      Failed tests: testVariableArray(org.jboss.weld.tests.unit.reflection.inheritance.TypeVariableResolverTest): expected:<class [Ljava.lang.Integer;> but was:<org.jboss.weld.util.reflection.GenericArrayTypeImpl@1dd003fb>

      This is caused by a bug in Weld implementation, which in turn is caused by a change in behaviour of TypeLiteral.getType() between JDK 6 and 7:
      As described in kohsuke's blog post, String[].class and GenericArrayType(String.class) are both possible representations of String[] type, but JDK 7 returns the first and JDK 6 returns the latter.
      It is already filed, documented and fixed in Weld, see WELD-1132.

      Test report:

      -------------------------------------------------------------------------------
      Test set: org.jboss.weld.tests.unit.reflection.inheritance.TypeVariableResolverTest
      -------------------------------------------------------------------------------
      Tests run: 12, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: -1,004,668.625 sec <<< FAILURE!
      testVariableArray(org.jboss.weld.tests.unit.reflection.inheritance.TypeVariableResolverTest)  Time elapsed: 0.002 sec  <<< FAILURE!
      junit.framework.AssertionFailedError: expected:<class [Ljava.lang.Integer;> but was:<org.jboss.weld.util.reflection.GenericArrayTypeImpl@228779e2>
      	at junit.framework.Assert.fail(Assert.java:47)
      	at junit.framework.Assert.failNotEquals(Assert.java:283)
      	at junit.framework.Assert.assertEquals(Assert.java:64)
      	at junit.framework.Assert.assertEquals(Assert.java:71)
      	at org.jboss.weld.tests.unit.reflection.inheritance.TypeVariableResolverTest.assertTypeEquals(TypeVariableResolverTest.java:80)
      	at org.jboss.weld.tests.unit.reflection.inheritance.TypeVariableResolverTest.testVariableArray(TypeVariableResolverTest.java:59)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:601)
      	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
      	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
      	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
      	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
      	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:76)
      	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
      	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
      	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
      	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
      	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
      	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
      	at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
      	at org.junit.runners.Suite.runChild(Suite.java:128)
      	at org.junit.runners.Suite.runChild(Suite.java:24)
      	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
      	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
      	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
      	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
      	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
      	at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
      	at org.junit.runners.Suite.runChild(Suite.java:128)
      	at org.junit.runners.Suite.runChild(Suite.java:24)
      	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
      	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
      	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
      	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
      	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
      	at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
      	at org.junit.runners.Suite.runChild(Suite.java:128)
      	at org.junit.runners.Suite.runChild(Suite.java:24)
      	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
      	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
      	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
      	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
      	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
      	at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
      	at org.junit.runner.JUnitCore.run(JUnitCore.java:157)
      	at org.junit.runner.JUnitCore.run(JUnitCore.java:136)
      	at org.junit.runner.JUnitCore.run(JUnitCore.java:127)
      	at org.apache.maven.surefire.junitcore.JUnitCoreWrapper.execute(JUnitCoreWrapper.java:52)
      	at org.apache.maven.surefire.junitcore.JUnitCoreProvider.invoke(JUnitCoreProvider.java:112)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:601)
      	at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:164)
      	at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:110)
      	at org.apache.maven.surefire.booter.SurefireStarter.invokeProvider(SurefireStarter.java:175)
      	at org.apache.maven.surefire.booter.SurefireStarter.runSuitesInProcessWhenForked(SurefireStarter.java:107)
      	at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:68)
      

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              alesj Aleš Justin
              Reporter:
              rsmeral Ron Šmeral (Inactive)
              Archiver:
              samahaja Sagar Mahajan

                Dates

                Created:
                Updated:
                Resolved:
                Archived: