JeffersonLab/epics2web

Use the JsonBuilderFactory

Closed this issue · 0 comments

Currently a JsonObjectBuilder is obtained using the non-factory method:

JsonObjectBuilder builder = Json.createObjectBuilder()

Instead, the factory method should be used to avoid frequent object construction:

final JsonBuilderFactory factory = Json.createBuilderFactory(null);
...
JsonObjectBuilder builder = factory.createObjectBuilder();