[PATCH] Don't attempt to add null objects to a JsonArray in RequestProcessor
For some reason, on some configurations, my plugin isn't registering itself properly, which causes an NPE in RequestProcessor#getHandlersInfoAsJson
. This is due to the code returning a null value (on purpose), and then attempting to add the null value to the JsonArray builder.
This is a regression from r16550. StringBuilder happily accepted null
values and output null
in the string.
I'm attaching a partial preferences xml so I can fix it in MapWithAI as well (I shouldn't be allowing 8111 ports in mapwithai.sources.entries
right now).
<tag key='remotecontrol.enabled' value='true'/>
<tag key='remotecontrol.new-layer' value='true'/>
<maps key='mapwithai.sources.entries'>
<map>
<tag key='parameters' value='[]'/>
<tag key='name' value='a'/>
<tag key='type' value='thirdParty'/>
<tag key='url' value='http://localhost:8111/features?q=mapwithai'/>
<tag key='cookies' value=''/>
<tag key='customHttpHeaders' value='{}'/>
<tag key='category' value='other'/>
</map>
EDIT: Not a MapWithAI specific bug
http://localhost:8111/features?q=add_node will also cause an NPE. It looks like we need to prepend a /
if one doesn't exist.
Change History
(7)
Cc: |
simon04 added
|
Description: |
modified (diff)
|
Component: |
Core → Core remotecontrol
|
Description: |
modified (diff)
|
Resolution: |
→ fixed
|
Status: |
new → closed
|
Prepend
/
to commands, if it doesn't exist