Bug 900421 (JBPAPP6-1075)
| Summary: | Weld 1.1 integration test TypeVariableResolverTest fails on ER7 with JDK7 | ||
|---|---|---|---|
| Product: | [JBoss] JBoss Enterprise Application Platform 6 | Reporter: | Ron Šmeral <rsmeral> |
| Component: | Other | Assignee: | Ales Justin <ales.justin> |
| Status: | CLOSED NEXTRELEASE | QA Contact: | |
| Severity: | high | Docs Contact: | |
| Priority: | high | ||
| Version: | 6.0.0 | CC: | amelicha, maschmid, pgier, rsmeral, smcgowan |
| Target Milestone: | --- | ||
| Target Release: | EAP 6.0.1 | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| URL: | http://jira.jboss.org/jira/browse/JBPAPP6-1075 | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: |
EAP 6.0.0.ER7, Weld 1.1.8.Final, Oracle JDK 1.7.0_04
|
|
| Last Closed: | 2012-10-26 18:18:21 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
| Bug Depends On: | |||
| Bug Blocks: | 900553 | ||
Link: Added: This issue relates to WELD-1132 Link: Added: This issue is a dependency of JBPAPP-9188 Weld upgraded to 1.1.9.Final-redhat-1 in EAP 6.0.1, so this should be fixed. Still broken in 6.0.1.ER2. The fix was applied only in Weld master (1.2.x), it needs to be backported to 1.1 branch. This issue will be picked up with WELD 1.1.10.Final in EAP 6.0.1.ER3. Link: Added: This issue is related to JBPAPP-10191 Affects: Added: Release Notes Release Notes Docs Status: Added: Not Required Writer: Added: Darrin Verified on EAP 6.0.1.ER3 / Weld 1.1.10.Final. Doesn't occur anymore. Release Notes Docs Status: Removed: Not Required Writer: Removed: Darrin Docs QE Status: Removed: NEW |
Affects: Release Notes project_key: JBPAPP6 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|http://weblogs.java.net/blog/kohsuke/archive/2008/12/introspecting_g.html], {{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: {noformat} ------------------------------------------------------------------------------- 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) {noformat}