From d9869f7441f84c7732585eff02ea3754b8b52ef6 Mon Sep 17 00:00:00 2001 From: Kamil Date: Mon, 18 Feb 2019 21:15:08 +0100 Subject: [PATCH] Use constructor injection instead of field injection --- module/app/it/innove/play/pdf/PdfGenerator.java | 8 ++++---- module/build.sbt | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/module/app/it/innove/play/pdf/PdfGenerator.java b/module/app/it/innove/play/pdf/PdfGenerator.java index 73f68a8..c6784e1 100644 --- a/module/app/it/innove/play/pdf/PdfGenerator.java +++ b/module/app/it/innove/play/pdf/PdfGenerator.java @@ -32,11 +32,11 @@ public class PdfGenerator { private List defaultFonts = null; - @Inject - Environment environment; - - public PdfGenerator() { + final Environment environment; + @Inject + public PdfGenerator(final Environment environment) { + this.environment = environment; } public void loadTemporaryFonts(List fontsToLoad) { diff --git a/module/build.sbt b/module/build.sbt index fd9f6fa..286ba8c 100644 --- a/module/build.sbt +++ b/module/build.sbt @@ -2,7 +2,7 @@ name := "play2-pdf" organization := "it.innove" -version := "1.8.0" +version := "1.8.1" lazy val root = (project in file(".")).enablePlugins(PlayJava)