Merge pull request #10 from ftiercelin/ISS1831

make UT Java 8 compliant
This commit is contained in:
François Tiercelin 2024-10-23 17:36:15 +01:00 committed by GitHub
commit f5ad4b5a50
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -199,8 +199,9 @@ public final class PDF417EncoderTestCase extends Assert {
final Integer heightRequested, final Dimensions dimensions) throws WriterException { final Integer heightRequested, final Dimensions dimensions) throws WriterException {
final Writer barcodeWriter = new PDF417Writer(); final Writer barcodeWriter = new PDF417Writer();
final int height = heightRequested == null ? width / 4 : heightRequested; final int height = heightRequested == null ? width / 4 : heightRequested;
final Map<EncodeHintType, ?> hints = Map.of(EncodeHintType.MARGIN, 0, Map<EncodeHintType, Object> hints = new HashMap<>();
EncodeHintType.PDF417_DIMENSIONS, dimensions); hints.put(EncodeHintType.MARGIN, 0);
hints.put(EncodeHintType.PDF417_DIMENSIONS, dimensions);
return barcodeWriter.encode(barcodeText, BarcodeFormat.PDF_417, width, height, hints); return barcodeWriter.encode(barcodeText, BarcodeFormat.PDF_417, width, height, hints);
} }
} }