Uploaded image for project: 'Forge'
  1. Forge
  2. FORGE-1962

CLAC throws NPE with proxied ArrayList

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Critical Critical
    • 2.8.0.Final
    • 2.7.2.Final
    • Furnace (Container)
    • None
    • Hide

      Download and build IntelliJ Forge plugin. Add inputMany.getValue() in CheckboxTableComponentBuilder.updateState(). Run plugin and select any checkbox in generated component.

      Show
      Download and build IntelliJ Forge plugin. Add inputMany.getValue() in CheckboxTableComponentBuilder.updateState(). Run plugin and select any checkbox in generated component.

      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:

      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)
      

              rhn-support-ggastald George Gastaldi
              adamwww_jira Adam WyƂuda (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: