Skip to content

NullPointerException in PropertiesResponder.makeJson() when page has empty <Suites> property #1599

Description

@dsporov

Describe the bug
Requesting ?properties&format=json for a page that has an empty <Suites/> element in its properties.xml causes a NullPointerException on the server. The HTML ?properties endpoint is unaffected.

To Reproduce
Steps to reproduce the behavior:

  1. Replace properties.xml for any FitNesse page with the properties.xml from the attachment.
  2. Request http://localhost:8081/<PageName>?properties&format=json.

Expected behavior
A valid JSON response is returned with an empty or absent Suites field.

Screenshots
Image

Sample Wiki Structure/content
properties.zip

Stack Trace
v20251025
java.lang.NullPointerException
at fitnesse.responders.editing.PropertiesResponder.makeJson(PropertiesResponder.java:112)
at fitnesse.responders.editing.PropertiesResponder.makeContent(PropertiesResponder.java:88)
at fitnesse.responders.editing.PropertiesResponder.makeResponse(PropertiesResponder.java:81)
at fitnesse.FitNesseExpediter.createGoodResponse(FitNesseExpediter.java:143)
at fitnesse.FitNesseExpediter.makeResponse(FitNesseExpediter.java:110)
at fitnesse.FitNesseExpediter.run(FitNesseExpediter.java:52)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:829)

Configuration:

  • OS: Windows Server 2022
  • Browser edge
  • Versions v20200501 and v20251025 of FitNesse
  • Test System: Slim
  • Plugins in use: -

Additional context
The empty was likely written by an older version of FitNesse.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions