Skip to content

Commit 8aea07b

Browse files
committed
PDFBOX-5660: Sonar fix
git-svn-id: https://svn.apache.org/repos/asf/pdfbox/trunk@1924842 13f79535-47bb-0310-9956-ffa450edef68
1 parent 4992fdc commit 8aea07b

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

tools/src/main/java/org/apache/pdfbox/tools/ExtractImages.java

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -80,18 +80,18 @@ public final class ExtractImages implements Callable<Integer>
8080
COSName.DCT_DECODE.getName(),
8181
COSName.DCT_DECODE_ABBREVIATION.getName());
8282

83-
@Option(names = "-password", description = "the password for the PDF or certificate in keystore.", arity = "0..1", interactive = true)
83+
@Option(names = "-password", description = "the password for the PDF or certificate in keystore.", arity = "0..1", interactive = true)
8484
private String password;
8585

86-
@Option(names = "-prefix", description = "the image prefix (default to pdf name).")
86+
@Option(names = "-prefix", description = "the image prefix (default to pdf name).")
8787
private String prefix;
8888

89-
@Option(names = "-useDirectJPEG", description = "Forces the direct extraction of JPEG/JPX images " +
90-
"regardless of colorspace or masking.")
89+
@Option(names = "-useDirectJPEG", description = "Forces the direct extraction of JPEG/JPX images " +
90+
"regardless of colorspace or masking.")
9191
private boolean useDirectJPEG;
9292

9393
@Option(names = "-noColorConvert", description = "Images are extracted with their " +
94-
"original colorspace if possible.")
94+
"original colorspace if possible.")
9595
private boolean noColorConvert;
9696

9797
@Option(names = {"-i", "--input"}, description = "the PDF file", required = true)
@@ -174,7 +174,7 @@ public void run() throws IOException
174174
PDExtendedGraphicsState extGState = res.getExtGState(name);
175175
if (extGState == null)
176176
{
177-
// can happen if key exists but no value
177+
// can happen if key exists but no value
178178
continue;
179179
}
180180
PDSoftMask softMask = extGState.getSoftMask();
@@ -268,7 +268,7 @@ public void endPath() throws IOException
268268
}
269269

270270
@Override
271-
protected void showGlyph(Matrix textRenderingMatrix,
271+
protected void showGlyph(Matrix textRenderingMatrix,
272272
PDFont font,
273273
int code,
274274
Vector displacement) throws IOException
@@ -366,7 +366,7 @@ else if ("jpx".equals(suffix))
366366
suffix = "png";
367367
if (elements > 3)
368368
{
369-
// More then 3 channels: Thats likely CMYK. We use tiff here,
369+
// More than 3 channels: That's likely CMYK. We use tiff here,
370370
// but a TIFF codec must be in the class path for this to work.
371371
suffix = "tiff";
372372
}
@@ -387,7 +387,7 @@ else if ("jpx".equals(suffix))
387387
if ("jpg".equals(suffix))
388388
{
389389
String colorSpaceName = pdImage.getColorSpace().getName();
390-
if (directJPEG ||
390+
if (directJPEG ||
391391
(PDDeviceGray.INSTANCE.getName().equals(colorSpaceName) ||
392392
PDDeviceRGB.INSTANCE.getName().equals(colorSpaceName)))
393393
{
@@ -442,7 +442,7 @@ else if ("tiff".equals(suffix) && pdImage.getColorSpace().equals(PDDeviceGray.IN
442442
int w = image.getWidth();
443443
int h = image.getHeight();
444444
BufferedImage bitonalImage = new BufferedImage(w, h, BufferedImage.TYPE_BYTE_BINARY);
445-
// copy image the old fashioned way - ColorConvertOp is slower!
445+
// copy image the old-fashioned way - ColorConvertOp is slower!
446446
for (int y = 0; y < h; y++)
447447
{
448448
for (int x = 0; x < w; x++)
@@ -464,7 +464,7 @@ else if ("tiff".equals(suffix) && pdImage.getColorSpace().equals(PDDeviceGray.IN
464464
}
465465
}
466466

467-
private boolean hasMasks(PDImage pdImage) throws IOException
467+
private boolean hasMasks(PDImage pdImage)
468468
{
469469
if (pdImage instanceof PDImageXObject)
470470
{

0 commit comments

Comments
 (0)