-
Bug
-
Resolution: Done
-
Major
-
1.1.8.Final
-
None
-
None
I upgraded Forge to Weld 1.1.8.Final, from 1.1.2.Final and now I am getting the following error:
com.google.common.collect.ComputationException: java.lang.NullPointerException at com.google.common.collect.ComputingConcurrentHashMap$ComputingMapAdapter.get(ComputingConcurrentHashMap.java:397) at org.jboss.weld.resources.SharedObjectCache.getTypeClosure(SharedObjectCache.java:82) at org.jboss.weld.resources.SharedObjectFacade.getTypeClosure(SharedObjectFacade.java:65) at org.jboss.weld.introspector.TypeClosureLazyValueHolder.computeValue(TypeClosureLazyValueHolder.java:52) at org.jboss.weld.introspector.TypeClosureLazyValueHolder.computeValue(TypeClosureLazyValueHolder.java:31) at org.jboss.weld.util.LazyValueHolder.get(LazyValueHolder.java:34) at org.jboss.weld.introspector.jlr.AbstractWeldAnnotated.getTypeClosure(AbstractWeldAnnotated.java:193) at org.jboss.weld.introspector.jlr.WeldMethodImpl.of(WeldMethodImpl.java:74) at org.jboss.weld.introspector.jlr.WeldClassImpl.<init>(WeldClassImpl.java:261) at org.jboss.weld.introspector.jlr.WeldClassImpl.of(WeldClassImpl.java:115) at org.jboss.weld.resources.ClassTransformer$TransformAnnotatedTypeToWeldClass.apply(ClassTransformer.java:88) at org.jboss.weld.resources.ClassTransformer$TransformAnnotatedTypeToWeldClass.apply(ClassTransformer.java:78) at com.google.common.collect.ComputingConcurrentHashMap$ComputingValueReference.compute(ComputingConcurrentHashMap.java:355) at com.google.common.collect.ComputingConcurrentHashMap$ComputingSegment.compute(ComputingConcurrentHashMap.java:184) at com.google.common.collect.ComputingConcurrentHashMap$ComputingSegment.getOrCompute(ComputingConcurrentHashMap.java:153) at com.google.common.collect.ComputingConcurrentHashMap.getOrCompute(ComputingConcurrentHashMap.java:69) at com.google.common.collect.ComputingConcurrentHashMap$ComputingMapAdapter.get(ComputingConcurrentHashMap.java:393) at org.jboss.weld.resources.ClassTransformer.loadClass(ClassTransformer.java:190) at org.jboss.weld.bootstrap.BeanDeployer.addClass(BeanDeployer.java:86) at org.jboss.weld.bootstrap.BeanDeployer.addClasses(BeanDeployer.java:123) at org.jboss.weld.bootstrap.BeanDeployment.createBeans(BeanDeployment.java:184) at org.jboss.weld.bootstrap.WeldBootstrap.deployBeans(WeldBootstrap.java:350) at org.jboss.weld.bootstrap.api.helpers.ForwardingBootstrap.deployBeans(ForwardingBootstrap.java:70) at org.jboss.weld.environment.se.Weld.initialize(Weld.java:133) at org.jboss.forge.shell.Bootstrap$1.run(Bootstrap.java:132) at java.lang.Thread.run(Thread.java:722) Caused by: java.lang.NullPointerException at java.lang.reflect.Array.newArray(Native Method) at java.lang.reflect.Array.newInstance(Array.java:70) at org.jboss.weld.util.reflection.HierarchyDiscovery.discoverTypes(HierarchyDiscovery.java:99) at org.jboss.weld.util.reflection.HierarchyDiscovery.init(HierarchyDiscovery.java:74) at org.jboss.weld.util.reflection.HierarchyDiscovery.getTypeClosure(HierarchyDiscovery.java:58) at org.jboss.weld.resources.SharedObjectCache$4.apply(SharedObjectCache.java:58) at org.jboss.weld.resources.SharedObjectCache$4.apply(SharedObjectCache.java:55) at com.google.common.collect.ComputingConcurrentHashMap$ComputingValueReference.compute(ComputingConcurrentHashMap.java:355) at com.google.common.collect.ComputingConcurrentHashMap$ComputingSegment.compute(ComputingConcurrentHashMap.java:184) at com.google.common.collect.ComputingConcurrentHashMap$ComputingSegment.getOrCompute(ComputingConcurrentHashMap.java:153) at com.google.common.collect.ComputingConcurrentHashMap.getOrCompute(ComputingConcurrentHashMap.java:69) at com.google.common.collect.ComputingConcurrentHashMap$ComputingMapAdapter.get(ComputingConcurrentHashMap.java:393)
This line is the causing issue: Class<?> arrayClass = Array.newInstance(Reflections.getRawType(genericComponentType), 0).getClass();
genericComponentType is sun.reflect.generics.reflectiveObjects.TypeVariableImpl.
Need a test case to simulate that