Skip to content

Commit 3b8fdb7

Browse files
committed
PDFBOX-5660: sonar fix
git-svn-id: https://svn.apache.org/repos/asf/pdfbox/trunk@1922838 13f79535-47bb-0310-9956-ffa450edef68
1 parent 224acc8 commit 3b8fdb7

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

pdfbox/src/test/java/org/apache/pdfbox/pdmodel/interactive/form/PDAcroFormTest.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -271,17 +271,17 @@ void testBadDA() throws IOException
271271
PDPage page = new PDPage();
272272
doc.addPage(page);
273273

274-
PDAcroForm acroForm = new PDAcroForm(document);
275-
doc.getDocumentCatalog().setAcroForm(acroForm);
276-
acroForm.setDefaultResources(new PDResources());
274+
PDAcroForm theAcroForm = new PDAcroForm(document);
275+
doc.getDocumentCatalog().setAcroForm(theAcroForm);
276+
theAcroForm.setDefaultResources(new PDResources());
277277

278-
PDTextField textBox = new PDTextField(acroForm);
278+
PDTextField textBox = new PDTextField(theAcroForm);
279279
textBox.setPartialName("SampleField");
280280

281281
// https://stackoverflow.com/questions/50609478/
282282
// "tf" is a typo, should have been "Tf" and this results that no font is chosen
283283
textBox.setDefaultAppearance("/Helv 0 tf 0 g");
284-
acroForm.getFields().add(textBox);
284+
theAcroForm.getFields().add(textBox);
285285

286286
PDAnnotationWidget widget = textBox.getWidgets().get(0);
287287
PDRectangle rect = new PDRectangle(50, 750, 200, 20);
@@ -422,12 +422,12 @@ void testPDFBox5797() throws IOException
422422
PDAcroFormFromAnnotsTest.class.getResourceAsStream("/org/apache/pdfbox/resources/ttf/LiberationSans-Regular.ttf"),
423423
false);
424424

425-
PDAcroForm acroForm = doc.getDocumentCatalog().getAcroForm();
426-
PDResources resources = acroForm.getDefaultResources();
425+
PDAcroForm theAcroForm = doc.getDocumentCatalog().getAcroForm();
426+
PDResources resources = theAcroForm.getDefaultResources();
427427
String fontName = resources.add(load).getName();
428428
String defaultAppearanceString = "/" + fontName + " 12 Tf 0 g";
429429

430-
PDTextField myField = (PDTextField) acroForm.getField("Name");
430+
PDTextField myField = (PDTextField) theAcroForm.getField("Name");
431431
myField.setDefaultAppearance(defaultAppearanceString);
432432
myField.getWidgets().get(0).setAppearance(null);
433433
myField.setValue("ŞŞ"); // Text with the Ş character made it crash

0 commit comments

Comments
 (0)