Tapestry 5.3.6 JSONObject No null checking leads to NPE in Palette component

classic Classic list List threaded Threaded
1 message Options
m!g
Reply | Threaded
Open this post in threaded view
|

Tapestry 5.3.6 JSONObject No null checking leads to NPE in Palette component

m!g
*java.lang.NullPointerException* :

    * at
      org.apache.tapestry5.json.JSONObject.printValue(JSONObject.java:887)
    * at org.apache.tapestry5.json.JSONArray.print(JSONArray.java:436)
    * at
      org.apache.tapestry5.json.JSONCollection.toString(JSONCollection.java:47)

    * at
      org.apache.tapestry5.json.JSONCollection.toString(JSONCollection.java:63)

    * at
      org.apache.tapestry5.corelib.components.Palette.beginRender(Palette.java:393)




There is no null checking in printValue(JSONPrintSession session, Object
value)

Adding :

         if (NULL.equals(value))
         {
             session.print(NULL.toString());
             return;
         }

solves the problem.

--
Best regards,
Michael Gagauz