]
George Gastaldi closed FORGE-1962.
----------------------------------
Resolution: Done
CLAC throws NPE with proxied ArrayList
--------------------------------------
Key: FORGE-1962
URL:
https://issues.jboss.org/browse/FORGE-1962
Project: Forge
Issue Type: Bug
Security Level: Public(Everyone can see)
Components: Furnace (Container)
Affects Versions: 2.7.2.Final
Environment: Windows 7 64bit, JDK8, Furnace embedded in IntelliJ plugin
Reporter: Adam WyĆuda
Assignee: George Gastaldi
Priority: Critical
Fix For: 2.7.3.Final
When ArrayList is passed to a proxied object, CLAC creates another proxy for the passed
list. The problem is, that this proxy is ForgeProxy, but behaves like unwrapped object (it
doesn't have getHandler() method). When the same list is being retrieved from the
proxied object, CLAC throws NPE in stripClassLoaderAdapters() method, because
isForgeProxy(list) returns true, but getForgeProxyHandler(list) is null.
Stack trace:
{code}
java.lang.NullPointerException
at
org.jboss.forge.furnace.proxy.ClassLoaderAdapterCallback.stripClassLoaderAdapters(ClassLoaderAdapterCallback.java:414)
at
org.jboss.forge.furnace.proxy.ClassLoaderAdapterCallback.enhanceResult(ClassLoaderAdapterCallback.java:237)
at
org.jboss.forge.furnace.proxy.ClassLoaderAdapterCallback.access$300(ClassLoaderAdapterCallback.java:37)
at
org.jboss.forge.furnace.proxy.ClassLoaderAdapterCallback$2.call(ClassLoaderAdapterCallback.java:124)
at org.jboss.forge.furnace.util.ClassLoaders.executeIn(ClassLoaders.java:40)
at
org.jboss.forge.furnace.proxy.ClassLoaderAdapterCallback.invoke(ClassLoaderAdapterCallback.java:96)
at
org.jboss.forge.addon.facets.AbstractFaceted_$$_javassist_ca9c3fe3-6195-4aaf-8a37-f0adc8d997f5.getValue(AbstractFaceted_$$_javassist_ca9c3fe3-6195-4aaf-8a37-f0adc8d997f5.java)
at
org.jboss.forge.plugin.idea.ui.component.many.CheckBoxTableComponentBuilder$1.updateState(CheckBoxTableComponentBuilder.java:90)
{code}