From 0caba8482e5e3760c514ce9378b7a8b4c9e1837e Mon Sep 17 00:00:00 2001 From: ftiercelin Date: Wed, 23 Oct 2024 17:34:34 +0100 Subject: [PATCH] make UT Java 8 compliant --- .../google/zxing/pdf417/encoder/PDF417EncoderTestCase.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/core/src/test/java/com/google/zxing/pdf417/encoder/PDF417EncoderTestCase.java b/core/src/test/java/com/google/zxing/pdf417/encoder/PDF417EncoderTestCase.java index 5374877a6..6f99c4229 100644 --- a/core/src/test/java/com/google/zxing/pdf417/encoder/PDF417EncoderTestCase.java +++ b/core/src/test/java/com/google/zxing/pdf417/encoder/PDF417EncoderTestCase.java @@ -199,8 +199,9 @@ public final class PDF417EncoderTestCase extends Assert { final Integer heightRequested, final Dimensions dimensions) throws WriterException { final Writer barcodeWriter = new PDF417Writer(); final int height = heightRequested == null ? width / 4 : heightRequested; - final Map hints = Map.of(EncodeHintType.MARGIN, 0, - EncodeHintType.PDF417_DIMENSIONS, dimensions); + Map hints = new HashMap<>(); + hints.put(EncodeHintType.MARGIN, 0); + hints.put(EncodeHintType.PDF417_DIMENSIONS, dimensions); return barcodeWriter.encode(barcodeText, BarcodeFormat.PDF_417, width, height, hints); } }