From bd449239f90b2899a89fade09691d11412210349 Mon Sep 17 00:00:00 2001 From: Lukas Jungmann Date: Tue, 28 Jun 2022 23:05:21 +0200 Subject: [PATCH] use constructor injection for @Context Signed-off-by: Lukas Jungmann --- .../org/eclipse/parsson/media/JsonValueBodyWriter.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/rest/src/main/java/org/eclipse/parsson/media/JsonValueBodyWriter.java b/rest/src/main/java/org/eclipse/parsson/media/JsonValueBodyWriter.java index ea3ecf4c..1896f029 100644 --- a/rest/src/main/java/org/eclipse/parsson/media/JsonValueBodyWriter.java +++ b/rest/src/main/java/org/eclipse/parsson/media/JsonValueBodyWriter.java @@ -53,8 +53,11 @@ public class JsonValueBodyWriter implements MessageBodyWriter { private JsonWriterFactory wf = Json.createWriterFactory(null); - @Context - private Configuration config; + private final Configuration config; + + public JsonValueBodyWriter(@Context Configuration config) { + this.config = config; + } @PostConstruct public void init() {