You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2025/07/20 22:11:27 UTC

(commons-imaging) 02/02: Merge some string literals

This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-imaging.git

commit 4de50fa7c59c6117eeafb79d91bb31c710e8073f
Author: Gary D. Gregory <ga...@gmail.com>
AuthorDate: Sun Jul 20 18:11:20 2025 -0400

    Merge some string literals
---
 .../commons/imaging/AbstractImageParser.java       |  2 +-
 .../apache/commons/imaging/FormatCompliance.java   |  8 ++--
 .../java/org/apache/commons/imaging/ImageDump.java |  8 ++--
 .../commons/imaging/common/BasicCParser.java       | 16 +++----
 .../imaging/formats/icns/IcnsImageParser.java      |  4 +-
 .../commons/imaging/formats/icns/IcnsType.java     |  2 +-
 .../imaging/formats/jpeg/JpegImageParser.java      |  6 +--
 .../imaging/formats/jpeg/decoder/JpegDecoder.java  |  2 +-
 .../formats/jpeg/decoder/JpegInputStream.java      |  2 +-
 .../imaging/formats/png/PngImageParser.java        |  6 +--
 .../imaging/formats/png/chunks/PngChunkPlte.java   |  2 +-
 .../imaging/formats/psd/PsdImageParser.java        |  4 +-
 .../commons/imaging/formats/tiff/TiffContents.java |  4 +-
 .../imaging/formats/tiff/TiffImageMetadata.java    |  2 +-
 .../commons/imaging/formats/tiff/TiffReader.java   |  2 +-
 .../tiff/datareaders/AbstractImageDataReader.java  |  2 +-
 .../formats/tiff/write/TiffOutputDirectory.java    |  2 +-
 .../imaging/formats/xbm/XbmImageParser.java        | 14 +++---
 .../imaging/formats/xpm/XpmImageParser.java        | 26 +++++------
 .../apache/commons/imaging/icc/IccProfileInfo.java | 30 ++++++-------
 .../org/apache/commons/imaging/icc/IccTag.java     |  4 +-
 .../commons/imaging/palette/ColorSpaceSubset.java  | 16 +++----
 .../commons/imaging/palette/PaletteFactory.java    |  2 +-
 .../org/apache/commons/imaging/ImageInfoTest.java  | 50 ++++++++++++++++++----
 .../commons/imaging/examples/MetadataExample.java  |  2 +-
 .../imaging/examples/tiff/SurveyTiffFile.java      |  2 +-
 .../imaging/formats/bmp/BmpRoundtripTest.java      |  2 +-
 .../imaging/formats/icns/IcnsRoundTripTest.java    |  2 +-
 .../imaging/formats/ico/IcoRoundtripTest.java      |  2 +-
 .../commons/imaging/roundtrip/FormatInfo.java      |  2 +-
 30 files changed, 131 insertions(+), 97 deletions(-)

diff --git a/src/main/java/org/apache/commons/imaging/AbstractImageParser.java b/src/main/java/org/apache/commons/imaging/AbstractImageParser.java
index a3c144c4..878ab103 100644
--- a/src/main/java/org/apache/commons/imaging/AbstractImageParser.java
+++ b/src/main/java/org/apache/commons/imaging/AbstractImageParser.java
@@ -712,7 +712,7 @@ public abstract class AbstractImageParser<T extends ImagingParameters<T>> extend
      */
     public final ImageMetadata getMetadata(final File file, final T params) throws ImagingException, IOException {
         if (LOGGER.isLoggable(Level.FINEST)) {
-            LOGGER.finest(getName() + ".getMetadata" + ": " + file.getName());
+            LOGGER.finest(getName() + ".getMetadata: " + file.getName());
         }
 
         if (!canAcceptExtension(file)) {
diff --git a/src/main/java/org/apache/commons/imaging/FormatCompliance.java b/src/main/java/org/apache/commons/imaging/FormatCompliance.java
index f5671fcd..4b0e469c 100644
--- a/src/main/java/org/apache/commons/imaging/FormatCompliance.java
+++ b/src/main/java/org/apache/commons/imaging/FormatCompliance.java
@@ -63,7 +63,7 @@ public class FormatCompliance {
 
     public boolean checkBounds(final String name, final int min, final int max, final int actual) throws ImagingException {
         if (actual < min || actual > max) {
-            addComment(name + ": " + "bounds check: " + min + " <= " + actual + " <= " + max + ": false");
+            addComment(name + ": bounds check: " + min + " <= " + actual + " <= " + max + ": false");
             return false;
         }
 
@@ -103,7 +103,7 @@ public class FormatCompliance {
 
     public boolean compareBytes(final String name, final byte[] expected, final byte[] actual) throws ImagingException {
         if (expected.length != actual.length) {
-            addComment(name + ": " + "Unexpected length: (expected: " + expected.length + ", actual: " + actual.length + ")");
+            addComment(name + ": Unexpected length: (expected: " + expected.length + ", actual: " + actual.length + ")");
             return false;
         }
         for (int i = 0; i < expected.length; i++) {
@@ -112,7 +112,7 @@ public class FormatCompliance {
             // + getValueDescription(actual[i]) + ")");
             if (expected[i] != actual[i]) {
                 addComment(
-                        name + ": " + "Unexpected value: (expected: " + getValueDescription(expected[i]) + ", actual: " + getValueDescription(actual[i]) + ")");
+                        name + ": Unexpected value: (expected: " + getValueDescription(expected[i]) + ", actual: " + getValueDescription(actual[i]) + ")");
                 return false;
             }
         }
@@ -136,7 +136,7 @@ public class FormatCompliance {
         pw.println("Format Compliance: " + description);
 
         if (comments.isEmpty()) {
-            pw.println("\t" + "No comments.");
+            pw.println("\tNo comments.");
         } else {
             for (int i = 0; i < comments.size(); i++) {
                 pw.println("\t" + (i + 1) + ": " + comments.get(i));
diff --git a/src/main/java/org/apache/commons/imaging/ImageDump.java b/src/main/java/org/apache/commons/imaging/ImageDump.java
index f1e78b50..28acc29c 100644
--- a/src/main/java/org/apache/commons/imaging/ImageDump.java
+++ b/src/main/java/org/apache/commons/imaging/ImageDump.java
@@ -34,7 +34,7 @@ public class ImageDump {
     private static final Logger LOGGER = Logger.getLogger(ImageDump.class.getName());
 
     private String colorSpaceTypeToName(final ColorSpace cs) {
-        // System.out.println(prefix + ": " + "type: "
+        // System.out.println(prefix + ": type: "
         // + cs.getType() );
         switch (cs.getType()) {
         case ColorSpace.TYPE_CMYK:
@@ -61,7 +61,7 @@ public class ImageDump {
     }
 
     public void dump(final String prefix, final BufferedImage src) throws IOException {
-        LOGGER.fine(prefix + ": " + "dump");
+        LOGGER.fine(prefix + ": dump");
         dumpColorSpace(prefix, src.getColorModel().getColorSpace());
         dumpBiProps(prefix, src);
     }
@@ -78,10 +78,10 @@ public class ImageDump {
     }
 
     public void dumpColorSpace(final String prefix, final ColorSpace cs) throws IOException {
-        LOGGER.fine(prefix + ": " + "type: " + cs.getType() + " (" + colorSpaceTypeToName(cs) + ")");
+        LOGGER.fine(prefix + ": type: " + cs.getType() + " (" + colorSpaceTypeToName(cs) + ")");
 
         if (!(cs instanceof ICC_ColorSpace)) {
-            LOGGER.fine(prefix + ": " + "Unknown ColorSpace: " + cs.getClass().getName());
+            LOGGER.fine(prefix + ": Unknown ColorSpace: " + cs.getClass().getName());
             return;
         }
 
diff --git a/src/main/java/org/apache/commons/imaging/common/BasicCParser.java b/src/main/java/org/apache/commons/imaging/common/BasicCParser.java
index 22836dc0..da362d97 100644
--- a/src/main/java/org/apache/commons/imaging/common/BasicCParser.java
+++ b/src/main/java/org/apache/commons/imaging/common/BasicCParser.java
@@ -47,7 +47,7 @@ public class BasicCParser {
      */
     private static int appendHex(int i, final StringBuilder stringBuilder, final String string) throws ImagingException {
         if (i + 2 >= string.length()) {
-            throw new ImagingException("Parsing XPM file failed, " + "hex constant in string too short");
+            throw new ImagingException("Parsing XPM file failed, hex constant in string too short");
         }
         final char hex1 = string.charAt(i + 1);
         final char hex2 = string.charAt(i + 2);
@@ -56,7 +56,7 @@ public class BasicCParser {
         try {
             constant = Integer.parseInt(hex1 + Character.toString(hex2), 16);
         } catch (final NumberFormatException nfe) {
-            throw new ImagingException("Parsing XPM file failed, " + "hex constant invalid", nfe);
+            throw new ImagingException("Parsing XPM file failed, hex constant invalid", nfe);
         }
         stringBuilder.append((char) constant);
         return i;
@@ -153,7 +153,7 @@ public class BasicCParser {
             stringBuilder.append((char) 0x0b);
             break;
         default:
-            throw new ImagingException("Parsing XPM file failed, " + "invalid escape sequence");
+            throw new ImagingException("Parsing XPM file failed, invalid escape sequence");
         }
         return i;
 
@@ -265,7 +265,7 @@ public class BasicCParser {
                         throw new ImagingException("Bad preprocessor directive");
                     }
                     if (!tokens[0].equals("define")) {
-                        throw new ImagingException("Invalid/unsupported " + "preprocessor directive '" + tokens[0] + "'");
+                        throw new ImagingException("Invalid/unsupported preprocessor directive '" + tokens[0] + "'");
                     }
                     defines.put(tokens[1], tokens.length == 3 ? tokens[2] : null);
                     directiveBuffer.setLength(0);
@@ -359,10 +359,10 @@ public class BasicCParser {
 
     public static void unescapeString(final StringBuilder stringBuilder, final String string) throws ImagingException {
         if (string.length() < 2) {
-            throw new ImagingException("Parsing XPM file failed, " + "string is too short");
+            throw new ImagingException("Parsing XPM file failed, string is too short");
         }
         if (string.charAt(0) != '"' || string.charAt(string.length() - 1) != '"') {
-            throw new ImagingException("Parsing XPM file failed, " + "string not surrounded by '\"'");
+            throw new ImagingException("Parsing XPM file failed, string not surrounded by '\"'");
         }
         boolean hadBackSlash = false;
         for (int i = 1; i < string.length() - 1; i++) {
@@ -373,13 +373,13 @@ public class BasicCParser {
             } else if (c == '\\') {
                 hadBackSlash = true;
             } else if (c == '"') {
-                throw new ImagingException("Parsing XPM file failed, " + "extra '\"' found in string");
+                throw new ImagingException("Parsing XPM file failed, extra '\"' found in string");
             } else {
                 stringBuilder.append(c);
             }
         }
         if (hadBackSlash) {
-            throw new ImagingException("Parsing XPM file failed, " + "unterminated escape sequence found in string");
+            throw new ImagingException("Parsing XPM file failed, unterminated escape sequence found in string");
         }
     }
 
diff --git a/src/main/java/org/apache/commons/imaging/formats/icns/IcnsImageParser.java b/src/main/java/org/apache/commons/imaging/formats/icns/IcnsImageParser.java
index 3dec12dc..d3eeff61 100644
--- a/src/main/java/org/apache/commons/imaging/formats/icns/IcnsImageParser.java
+++ b/src/main/java/org/apache/commons/imaging/formats/icns/IcnsImageParser.java
@@ -196,7 +196,7 @@ public class IcnsImageParser extends AbstractImageParser<IcnsImagingParameters>
         // Length of data (4 bytes), in bytes, including this header
         final int elementSize = read4Bytes("ElementSize", is, "Not a valid ICNS file", getByteOrder());
         if (elementSize > remainingSize) {
-            throw new IOException(String.format("Corrupted ICNS file: element size %d is greater than " + "remaining size %d", elementSize, remainingSize));
+            throw new IOException(String.format("Corrupted ICNS file: element size %d is greater than remaining size %d", elementSize, remainingSize));
         }
         final byte[] data = readBytes("Data", is, elementSize - 8, "Not a valid ICNS file");
 
@@ -208,7 +208,7 @@ public class IcnsImageParser extends AbstractImageParser<IcnsImagingParameters>
         final int fileSize = read4Bytes("FileSize", is, "Not a Valid ICNS File", getByteOrder());
 
         if (magic != ICNS_MAGIC) {
-            throw new ImagingException("Not a Valid ICNS File: " + "magic is 0x" + Integer.toHexString(magic));
+            throw new ImagingException("Not a Valid ICNS File: magic is 0x" + Integer.toHexString(magic));
         }
 
         return new IcnsHeader(magic, fileSize);
diff --git a/src/main/java/org/apache/commons/imaging/formats/icns/IcnsType.java b/src/main/java/org/apache/commons/imaging/formats/icns/IcnsType.java
index 4e6068b5..f9c2f031 100644
--- a/src/main/java/org/apache/commons/imaging/formats/icns/IcnsType.java
+++ b/src/main/java/org/apache/commons/imaging/formats/icns/IcnsType.java
@@ -149,6 +149,6 @@ enum IcnsType {
 
     @Override
     public String toString() {
-        return getClass().getName() + "[" + "width=" + width + "," + "height=" + height + "," + "bpp=" + bitsPerPixel + "," + "hasMask=" + hasMask + "]";
+        return getClass().getName() + "[width=" + width + ",height=" + height + ",bpp=" + bitsPerPixel + ",hasMask=" + hasMask + "]";
     }
 }
diff --git a/src/main/java/org/apache/commons/imaging/formats/jpeg/JpegImageParser.java b/src/main/java/org/apache/commons/imaging/formats/jpeg/JpegImageParser.java
index d8a419e6..20fe5b1a 100644
--- a/src/main/java/org/apache/commons/imaging/formats/jpeg/JpegImageParser.java
+++ b/src/main/java/org/apache/commons/imaging/formats/jpeg/JpegImageParser.java
@@ -249,7 +249,7 @@ public class JpegImageParser extends AbstractImageParser<JpegImagingParameters>
 
         final List<AbstractSegment> exifSegments = filterApp1Segments(abstractSegments);
         if (LOGGER.isLoggable(Level.FINEST)) {
-            LOGGER.finest("exifSegments.size()" + ": " + exifSegments.size());
+            LOGGER.finest("exifSegments.size(): " + exifSegments.size());
         }
 
         // Debug.debug("segments", segments);
@@ -261,7 +261,7 @@ public class JpegImageParser extends AbstractImageParser<JpegImagingParameters>
         }
         if (exifSegments.size() > 1) {
             throw new ImagingException(
-                    "Imaging currently can't parse EXIF metadata split across multiple APP1 segments.  " + "Please send this image to the Imaging project.");
+                    "Imaging currently can't parse EXIF metadata split across multiple APP1 segments.  Please send this image to the Imaging project.");
         }
 
         final AbstractGenericSegment segment = (AbstractGenericSegment) exifSegments.get(0);
@@ -296,7 +296,7 @@ public class JpegImageParser extends AbstractImageParser<JpegImagingParameters>
         final byte[] bytes = assembleSegments(filtered);
 
         if (LOGGER.isLoggable(Level.FINEST)) {
-            LOGGER.finest("bytes" + ": " + bytes.length);
+            LOGGER.finest("bytes: " + bytes.length);
         }
 
         return bytes;
diff --git a/src/main/java/org/apache/commons/imaging/formats/jpeg/decoder/JpegDecoder.java b/src/main/java/org/apache/commons/imaging/formats/jpeg/decoder/JpegDecoder.java
index 82c1dc6f..e26a4b4b 100644
--- a/src/main/java/org/apache/commons/imaging/formats/jpeg/decoder/JpegDecoder.java
+++ b/src/main/java/org/apache/commons/imaging/formats/jpeg/decoder/JpegDecoder.java
@@ -357,7 +357,7 @@ public class JpegDecoder extends BinaryFileParser implements JpegUtils.Visitor {
 
         if (Arrays.binarySearch(sofnSegments, marker) >= 0) {
             if (marker != JpegConstants.SOF0_MARKER) {
-                throw new ImagingException("Only sequential, baseline JPEGs " + "are supported at the moment");
+                throw new ImagingException("Only sequential, baseline JPEGs are supported at the moment");
             }
             sofnSegment = new SofnSegment(marker, segmentData);
         } else if (marker == JpegConstants.DQT_MARKER) {
diff --git a/src/main/java/org/apache/commons/imaging/formats/jpeg/decoder/JpegInputStream.java b/src/main/java/org/apache/commons/imaging/formats/jpeg/decoder/JpegInputStream.java
index 134d2a2c..7fb5f7aa 100644
--- a/src/main/java/org/apache/commons/imaging/formats/jpeg/decoder/JpegInputStream.java
+++ b/src/main/java/org/apache/commons/imaging/formats/jpeg/decoder/JpegInputStream.java
@@ -59,7 +59,7 @@ final class JpegInputStream {
                     if (b2 == (0xff & JpegConstants.DNL_MARKER)) {
                         throw new ImagingException("DNL not yet supported");
                     }
-                    throw new ImagingException("Invalid marker found " + "in entropy data: 0xFF " + Integer.toHexString(b2));
+                    throw new ImagingException("Invalid marker found in entropy data: 0xFF " + Integer.toHexString(b2));
                 }
             }
         }
diff --git a/src/main/java/org/apache/commons/imaging/formats/png/PngImageParser.java b/src/main/java/org/apache/commons/imaging/formats/png/PngImageParser.java
index c8c07a19..0aae1b71 100644
--- a/src/main/java/org/apache/commons/imaging/formats/png/PngImageParser.java
+++ b/src/main/java/org/apache/commons/imaging/formats/png/PngImageParser.java
@@ -499,11 +499,11 @@ public class PngImageParser extends AbstractImageParser<PngImagingParameters> im
 
         // if (pngChunkpHYs != null)
         // {
-        // System.out.println("\t" + "pngChunkpHYs.UnitSpecifier: " +
+        // System.out.println("\tpngChunkpHYs.UnitSpecifier: " +
         // pngChunkpHYs.UnitSpecifier );
-        // System.out.println("\t" + "pngChunkpHYs.PixelsPerUnitYAxis: " +
+        // System.out.println("\tpngChunkpHYs.PixelsPerUnitYAxis: " +
         // pngChunkpHYs.PixelsPerUnitYAxis );
-        // System.out.println("\t" + "pngChunkpHYs.PixelsPerUnitXAxis: " +
+        // System.out.println("\tpngChunkpHYs.PixelsPerUnitXAxis: " +
         // pngChunkpHYs.PixelsPerUnitXAxis );
         // }
         if (pngChunkpHYs != null && pngChunkpHYs.getUnitSpecifier() == 1) { // meters
diff --git a/src/main/java/org/apache/commons/imaging/formats/png/chunks/PngChunkPlte.java b/src/main/java/org/apache/commons/imaging/formats/png/chunks/PngChunkPlte.java
index b57ae940..afcf5e35 100644
--- a/src/main/java/org/apache/commons/imaging/formats/png/chunks/PngChunkPlte.java
+++ b/src/main/java/org/apache/commons/imaging/formats/png/chunks/PngChunkPlte.java
@@ -62,7 +62,7 @@ public final class PngChunkPlte extends PngChunk {
     // Debug.debug();
     // Debug.debug("palette");
     // for (int i = 0; i < rgb.length; i++) {
-    // Debug.debug("\t" + "palette[" + i + "];", rgb[i] + " (0x"
+    // Debug.debug("\tpalette[" + i + "];", rgb[i] + " (0x"
     // + Integer.toHexString(rgb[i]) + ")");
     //
     // }
diff --git a/src/main/java/org/apache/commons/imaging/formats/psd/PsdImageParser.java b/src/main/java/org/apache/commons/imaging/formats/psd/PsdImageParser.java
index 8da10347..5d025bfa 100644
--- a/src/main/java/org/apache/commons/imaging/formats/psd/PsdImageParser.java
+++ b/src/main/java/org/apache/commons/imaging/formats/psd/PsdImageParser.java
@@ -95,11 +95,11 @@ public class PsdImageParser extends AbstractImageParser<PsdImagingParameters> im
         // System.out.println("gif.blocks: " + blocks.blocks.size());
         for (int i = 0; i < blocks.size(); i++) {
             final ImageResourceBlock block = blocks.get(i);
-            pw.println("\t" + i + " (" + Integer.toHexString(block.id) + ", " + "'" + new String(block.nameData, StandardCharsets.ISO_8859_1) + "' ("
+            pw.println("\t" + i + " (" + Integer.toHexString(block.id) + ", '" + new String(block.nameData, StandardCharsets.ISO_8859_1) + "' ("
                     + block.nameData.length + "), "
                     // + block.getClass().getName()
                     // + ", "
-                    + " data: " + block.data.length + " type: '" + ImageResourceType.getDescription(block.id) + "' " + ")");
+                    + " data: " + block.data.length + " type: '" + ImageResourceType.getDescription(block.id) + "' )");
         }
 
         pw.println("");
diff --git a/src/main/java/org/apache/commons/imaging/formats/tiff/TiffContents.java b/src/main/java/org/apache/commons/imaging/formats/tiff/TiffContents.java
index 8554d019..dec9f4b1 100644
--- a/src/main/java/org/apache/commons/imaging/formats/tiff/TiffContents.java
+++ b/src/main/java/org/apache/commons/imaging/formats/tiff/TiffContents.java
@@ -44,10 +44,10 @@ public class TiffContents {
         long lastEnd = 0;
         for (final AbstractTiffElement element : elements) {
             if (element.offset > lastEnd) {
-                Debug.debug("\t" + "gap: " + (element.offset - lastEnd));
+                Debug.debug("\tgap: " + (element.offset - lastEnd));
             }
             if (element.offset < lastEnd) {
-                Debug.debug("\t" + "overlap");
+                Debug.debug("\toverlap");
             }
 
             Debug.debug("element, start: " + element.offset + ", length: " + element.length + ", end: " + (element.offset + element.length) + ": "
diff --git a/src/main/java/org/apache/commons/imaging/formats/tiff/TiffImageMetadata.java b/src/main/java/org/apache/commons/imaging/formats/tiff/TiffImageMetadata.java
index 178ea166..95474a48 100644
--- a/src/main/java/org/apache/commons/imaging/formats/tiff/TiffImageMetadata.java
+++ b/src/main/java/org/apache/commons/imaging/formats/tiff/TiffImageMetadata.java
@@ -110,7 +110,7 @@ public class TiffImageMetadata extends GenericImageMetadata {
 
                     // if (tagInfo.isUnknown())
                     // Debug.debug(
-                    // "\t" + "unknown tag(0x"
+                    // "\tunknown tag(0x"
                     // + Integer.toHexString(srcField.tag)
                     // + ") bytes", bytes);
 
diff --git a/src/main/java/org/apache/commons/imaging/formats/tiff/TiffReader.java b/src/main/java/org/apache/commons/imaging/formats/tiff/TiffReader.java
index ea955c18..562c1373 100644
--- a/src/main/java/org/apache/commons/imaging/formats/tiff/TiffReader.java
+++ b/src/main/java/org/apache/commons/imaging/formats/tiff/TiffReader.java
@@ -335,7 +335,7 @@ public class TiffReader extends BinaryFileParser {
                 if (valueLength > entryMaxValueLength) {
                     if (offset < 0 || offset + valueLength > byteSource.size()) {
                         if (strict) {
-                            throw new IOException("Attempt to read byte range starting from " + offset + " " + "of length " + valueLength + " "
+                            throw new IOException("Attempt to read byte range starting from " + offset + " of length " + valueLength + " "
                                     + "which is outside the file's size of " + byteSource.size());
                         }
                         // corrupt field, ignore it
diff --git a/src/main/java/org/apache/commons/imaging/formats/tiff/datareaders/AbstractImageDataReader.java b/src/main/java/org/apache/commons/imaging/formats/tiff/datareaders/AbstractImageDataReader.java
index 330cfb32..dd5c7b1b 100644
--- a/src/main/java/org/apache/commons/imaging/formats/tiff/datareaders/AbstractImageDataReader.java
+++ b/src/main/java/org/apache/commons/imaging/formats/tiff/datareaders/AbstractImageDataReader.java
@@ -558,7 +558,7 @@ public abstract class AbstractImageDataReader {
             // that can be used for testing and analysis.
             if (bitsPerPixel / samplesPerPixel != 32) {
                 throw new ImagingException(
-                        "Imaging does not yet support floating-point data" + " with predictor type 3 for " + bitsPerPixel + " bits per sample");
+                        "Imaging does not yet support floating-point data with predictor type 3 for " + bitsPerPixel + " bits per sample");
             }
 
             if (planarConfiguration == TiffPlanarConfiguration.CHUNKY) {
diff --git a/src/main/java/org/apache/commons/imaging/formats/tiff/write/TiffOutputDirectory.java b/src/main/java/org/apache/commons/imaging/formats/tiff/write/TiffOutputDirectory.java
index baf69a7a..59e9419f 100644
--- a/src/main/java/org/apache/commons/imaging/formats/tiff/write/TiffOutputDirectory.java
+++ b/src/main/java/org/apache/commons/imaging/formats/tiff/write/TiffOutputDirectory.java
@@ -611,7 +611,7 @@ public final class TiffOutputDirectory extends AbstractTiffOutputItem implements
         for (final TiffOutputField field : fields) {
             field.writeField(bos);
 
-            // Debug.debug("\t" + "writing field (" + field.tag + ", 0x" +
+            // Debug.debug("\twriting field (" + field.tag + ", 0x" +
             // Integer.toHexString(field.tag) + ")", field.tagInfo);
             // if (field.tagInfo.isOffset())
             // Debug.debug("\t\tOFFSET!", field.bytes);
diff --git a/src/main/java/org/apache/commons/imaging/formats/xbm/XbmImageParser.java b/src/main/java/org/apache/commons/imaging/formats/xbm/XbmImageParser.java
index 0fa47e2f..ff6111b1 100644
--- a/src/main/java/org/apache/commons/imaging/formats/xbm/XbmImageParser.java
+++ b/src/main/java/org/apache/commons/imaging/formats/xbm/XbmImageParser.java
@@ -231,7 +231,7 @@ public class XbmImageParser extends AbstractImageParser<XbmImagingParameters> {
         }
         token = cParser.nextToken();
         if (token == null) {
-            throw new ImagingException("Parsing XBM file failed, no 'unsigned' " + "or 'char' or 'short' token");
+            throw new ImagingException("Parsing XBM file failed, no 'unsigned' or 'char' or 'short' token");
         }
         if ("unsigned".equals(token)) {
             token = cParser.nextToken();
@@ -252,12 +252,12 @@ public class XbmImageParser extends AbstractImageParser<XbmImagingParameters> {
             throw new ImagingException("Parsing XBM file failed, no variable name");
         }
         if (name.charAt(0) != '_' && !Character.isLetter(name.charAt(0))) {
-            throw new ImagingException("Parsing XBM file failed, variable name " + "doesn't start with letter or underscore");
+            throw new ImagingException("Parsing XBM file failed, variable name doesn't start with letter or underscore");
         }
         for (int i = 0; i < name.length(); i++) {
             final char c = name.charAt(i);
             if (!Character.isLetterOrDigit(c) && c != '_') {
-                throw new ImagingException("Parsing XBM file failed, variable name " + "contains non-letter non-digit non-underscore");
+                throw new ImagingException("Parsing XBM file failed, variable name contains non-letter non-digit non-underscore");
             }
         }
         token = cParser.nextToken();
@@ -284,10 +284,10 @@ public class XbmImageParser extends AbstractImageParser<XbmImagingParameters> {
             for (int x = 0; x < xbmHeader.width; x += inputWidth) {
                 token = cParser.nextToken();
                 if (token == null || !token.startsWith("0x")) {
-                    throw new ImagingException("Parsing XBM file failed, " + "hex value missing");
+                    throw new ImagingException("Parsing XBM file failed, hex value missing");
                 }
                 if (token.length() > hexWidth) {
-                    throw new ImagingException("Parsing XBM file failed, " + "hex value too long");
+                    throw new ImagingException("Parsing XBM file failed, hex value too long");
                 }
                 final int value = Integer.parseInt(token.substring(2), 16);
                 final int flipped = Integer.reverse(value) >>> 32 - inputWidth;
@@ -302,10 +302,10 @@ public class XbmImageParser extends AbstractImageParser<XbmImagingParameters> {
 
                 token = cParser.nextToken();
                 if (token == null) {
-                    throw new ImagingException("Parsing XBM file failed, " + "premature end of file");
+                    throw new ImagingException("Parsing XBM file failed, premature end of file");
                 }
                 if (!",".equals(token) && (i < imageData.length || !"}".equals(token))) {
-                    throw new ImagingException("Parsing XBM file failed, " + "punctuation error");
+                    throw new ImagingException("Parsing XBM file failed, punctuation error");
                 }
             }
         }
diff --git a/src/main/java/org/apache/commons/imaging/formats/xpm/XpmImageParser.java b/src/main/java/org/apache/commons/imaging/formats/xpm/XpmImageParser.java
index 265f27da..29f43674 100644
--- a/src/main/java/org/apache/commons/imaging/formats/xpm/XpmImageParser.java
+++ b/src/main/java/org/apache/commons/imaging/formats/xpm/XpmImageParser.java
@@ -283,7 +283,7 @@ public class XpmImageParser extends AbstractImageParser<XpmImagingParameters> {
             return 0x00000000;
         }
         if (color.charAt(0) == '%') {
-            throw new ImagingException("HSV colors are not implemented " + "even in the XPM specification!");
+            throw new ImagingException("HSV colors are not implemented even in the XPM specification!");
         }
         if ("None".equals(color)) {
             return 0x00000000;
@@ -297,7 +297,7 @@ public class XpmImageParser extends AbstractImageParser<XpmImagingParameters> {
         stringBuilder.setLength(0);
         String token = cParser.nextToken();
         if (token.charAt(0) != '"') {
-            throw new ImagingException("Parsing XPM file failed, " + "no string found where expected");
+            throw new ImagingException("Parsing XPM file failed, no string found where expected");
         }
         BasicCParser.unescapeString(stringBuilder, token);
         for (token = cParser.nextToken(); token.charAt(0) == '"'; token = cParser.nextToken()) {
@@ -309,7 +309,7 @@ public class XpmImageParser extends AbstractImageParser<XpmImagingParameters> {
         if ("}".equals(token)) {
             return false;
         }
-        throw new ImagingException("Parsing XPM file failed, " + "no ',' or '}' found where expected");
+        throw new ImagingException("Parsing XPM file failed, no ',' or '}' found where expected");
     }
 
     private void parsePaletteEntries(final XpmHeader xpmHeader, final BasicCParser cParser) throws IOException, ImagingException {
@@ -318,7 +318,7 @@ public class XpmImageParser extends AbstractImageParser<XpmImagingParameters> {
             row.setLength(0);
             final boolean hasMore = parseNextString(cParser, row);
             if (!hasMore) {
-                throw new ImagingException("Parsing XPM file failed, " + "file ended while reading palette");
+                throw new ImagingException("Parsing XPM file failed, file ended while reading palette");
             }
             final String name = row.substring(0, xpmHeader.numCharsPerPixel);
             final String[] tokens = BasicCParser.tokenizeRow(row.substring(xpmHeader.numCharsPerPixel));
@@ -380,12 +380,12 @@ public class XpmImageParser extends AbstractImageParser<XpmImagingParameters> {
             throw new ImagingException("Parsing XPM file failed, no variable name");
         }
         if (name.charAt(0) != '_' && !Character.isLetter(name.charAt(0))) {
-            throw new ImagingException("Parsing XPM file failed, variable name " + "doesn't start with letter or underscore");
+            throw new ImagingException("Parsing XPM file failed, variable name doesn't start with letter or underscore");
         }
         for (int i = 0; i < name.length(); i++) {
             final char c = name.charAt(i);
             if (!Character.isLetterOrDigit(c) && c != '_') {
-                throw new ImagingException("Parsing XPM file failed, variable name " + "contains non-letter non-digit non-underscore");
+                throw new ImagingException("Parsing XPM file failed, variable name contains non-letter non-digit non-underscore");
             }
         }
         token = cParser.nextToken();
@@ -408,7 +408,7 @@ public class XpmImageParser extends AbstractImageParser<XpmImagingParameters> {
         final StringBuilder row = new StringBuilder();
         final boolean hasMore = parseNextString(cParser, row);
         if (!hasMore) {
-            throw new ImagingException("Parsing XPM file failed, " + "file too short");
+            throw new ImagingException("Parsing XPM file failed, file too short");
         }
         final XpmHeader xpmHeader = parseXpmValuesSection(row.toString());
         parsePaletteEntries(xpmHeader, cParser);
@@ -420,7 +420,7 @@ public class XpmImageParser extends AbstractImageParser<XpmImagingParameters> {
             final StringBuilder firstComment = new StringBuilder();
             final ByteArrayOutputStream preprocessedFile = BasicCParser.preprocess(is, firstComment, null);
             if (!"XPM".equals(firstComment.toString().trim())) {
-                throw new ImagingException("Parsing XPM file failed, " + "signature isn't '/* XPM */'");
+                throw new ImagingException("Parsing XPM file failed, signature isn't '/* XPM */'");
             }
 
             final XpmParseResult xpmParseResult = new XpmParseResult();
@@ -433,7 +433,7 @@ public class XpmImageParser extends AbstractImageParser<XpmImagingParameters> {
     private XpmHeader parseXpmValuesSection(final String row) throws ImagingException {
         final String[] tokens = BasicCParser.tokenizeRow(row);
         if (tokens.length < 4 || tokens.length > 7) {
-            throw new ImagingException("Parsing XPM file failed, " + "<Values> section has incorrect tokens");
+            throw new ImagingException("Parsing XPM file failed, <Values> section has incorrect tokens");
         }
         try {
             final int width = Integer.parseInt(tokens[0]);
@@ -449,13 +449,13 @@ public class XpmImageParser extends AbstractImageParser<XpmImagingParameters> {
             }
             if (tokens.length == 5 || tokens.length == 7) {
                 if (!"XPMEXT".equals(tokens[tokens.length - 1])) {
-                    throw new ImagingException("Parsing XPM file failed, " + "can't parse <Values> section XPMEXT");
+                    throw new ImagingException("Parsing XPM file failed, can't parse <Values> section XPMEXT");
                 }
                 xpmExt = true;
             }
             return new XpmHeader(width, height, numColors, numCharsPerPixel, xHotSpot, yHotSpot, xpmExt);
         } catch (final NumberFormatException nfe) {
-            throw new ImagingException("Parsing XPM file failed, " + "error parsing <Values> section", nfe);
+            throw new ImagingException("Parsing XPM file failed, error parsing <Values> section", nfe);
         }
     }
 
@@ -569,14 +569,14 @@ public class XpmImageParser extends AbstractImageParser<XpmImagingParameters> {
             row.setLength(0);
             hasMore = parseNextString(cParser, row);
             if (y < xpmHeader.height - 1 && !hasMore) {
-                throw new ImagingException("Parsing XPM file failed, " + "insufficient image rows in file");
+                throw new ImagingException("Parsing XPM file failed, insufficient image rows in file");
             }
             final int rowOffset = y * xpmHeader.width;
             for (int x = 0; x < xpmHeader.width; x++) {
                 final String index = row.substring(x * xpmHeader.numCharsPerPixel, (x + 1) * xpmHeader.numCharsPerPixel);
                 final PaletteEntry paletteEntry = xpmHeader.palette.get(index);
                 if (paletteEntry == null) {
-                    throw new ImagingException("No palette entry was defined " + "for " + index);
+                    throw new ImagingException("No palette entry was defined for " + index);
                 }
                 if (bpp <= 16) {
                     dataBuffer.setElem(rowOffset + x, paletteEntry.index);
diff --git a/src/main/java/org/apache/commons/imaging/icc/IccProfileInfo.java b/src/main/java/org/apache/commons/imaging/icc/IccProfileInfo.java
index 0ad9462a..7c009864 100644
--- a/src/main/java/org/apache/commons/imaging/icc/IccProfileInfo.java
+++ b/src/main/java/org/apache/commons/imaging/icc/IccProfileInfo.java
@@ -105,27 +105,27 @@ public class IccProfileInfo {
         final StringWriter sw = new StringWriter();
         final PrintWriter pw = new PrintWriter(sw);
 
-        pw.println(prefix + ": " + "data length: " + data.length);
-
-        printCharQuad(pw, prefix + ": " + "ProfileDeviceClassSignature", profileDeviceClassSignature);
-        printCharQuad(pw, prefix + ": " + "CMMTypeSignature", cmmTypeSignature);
-        printCharQuad(pw, prefix + ": " + "ProfileDeviceClassSignature", profileDeviceClassSignature);
-        printCharQuad(pw, prefix + ": " + "ColorSpace", colorSpace);
-        printCharQuad(pw, prefix + ": " + "ProfileConnectionSpace", profileConnectionSpace);
-        printCharQuad(pw, prefix + ": " + "ProfileFileSignature", profileFileSignature);
-        printCharQuad(pw, prefix + ": " + "PrimaryPlatformSignature", primaryPlatformSignature);
-        printCharQuad(pw, prefix + ": " + "ProfileFileSignature", profileFileSignature);
-        printCharQuad(pw, prefix + ": " + "DeviceManufacturer", deviceManufacturer);
-        printCharQuad(pw, prefix + ": " + "DeviceModel", deviceModel);
-        printCharQuad(pw, prefix + ": " + "RenderingIntent", renderingIntent);
-        printCharQuad(pw, prefix + ": " + "ProfileCreatorSignature", profileCreatorSignature);
+        pw.println(prefix + ": data length: " + data.length);
+
+        printCharQuad(pw, prefix + ": ProfileDeviceClassSignature", profileDeviceClassSignature);
+        printCharQuad(pw, prefix + ": CMMTypeSignature", cmmTypeSignature);
+        printCharQuad(pw, prefix + ": ProfileDeviceClassSignature", profileDeviceClassSignature);
+        printCharQuad(pw, prefix + ": ColorSpace", colorSpace);
+        printCharQuad(pw, prefix + ": ProfileConnectionSpace", profileConnectionSpace);
+        printCharQuad(pw, prefix + ": ProfileFileSignature", profileFileSignature);
+        printCharQuad(pw, prefix + ": PrimaryPlatformSignature", primaryPlatformSignature);
+        printCharQuad(pw, prefix + ": ProfileFileSignature", profileFileSignature);
+        printCharQuad(pw, prefix + ": DeviceManufacturer", deviceManufacturer);
+        printCharQuad(pw, prefix + ": DeviceModel", deviceModel);
+        printCharQuad(pw, prefix + ": RenderingIntent", renderingIntent);
+        printCharQuad(pw, prefix + ": ProfileCreatorSignature", profileCreatorSignature);
 
         for (int i = 0; i < tags.length; i++) {
             final IccTag tag = tags[i];
             tag.dump(pw, "\t" + i + ": ");
         }
 
-        pw.println(prefix + ": " + "isSrgb: " + isSrgb());
+        pw.println(prefix + ": isSrgb: " + isSrgb());
         pw.flush();
 
         return sw.getBuffer().toString();
diff --git a/src/main/java/org/apache/commons/imaging/icc/IccTag.java b/src/main/java/org/apache/commons/imaging/icc/IccTag.java
index dca9bb17..f8cd6dce 100644
--- a/src/main/java/org/apache/commons/imaging/icc/IccTag.java
+++ b/src/main/java/org/apache/commons/imaging/icc/IccTag.java
@@ -66,7 +66,7 @@ public class IccTag {
                     + ")");
 
             if (itdt == null) {
-                pw.println(prefix + "IccTagType : " + "unknown");
+                pw.println(prefix + "IccTagType : unknown");
             } else {
                 pw.println(prefix + "IccTagType : " + itdt.getName());
                 itdt.dump(prefix, data);
@@ -108,7 +108,7 @@ public class IccTag {
             itdt = getIccTagDataType(dataTypeSignature);
             // if (itdt != null)
             // {
-            // System.out.println("\t\t\t" + "itdt: " + itdt.name);
+            // System.out.println("\t\t\titdt: " + itdt.name);
             // }
         }
     }
diff --git a/src/main/java/org/apache/commons/imaging/palette/ColorSpaceSubset.java b/src/main/java/org/apache/commons/imaging/palette/ColorSpaceSubset.java
index 92b98937..d6d48459 100644
--- a/src/main/java/org/apache/commons/imaging/palette/ColorSpaceSubset.java
+++ b/src/main/java/org/apache/commons/imaging/palette/ColorSpaceSubset.java
@@ -104,18 +104,18 @@ final class ColorSpaceSubset {
         // + (100.0 * (double) total / (double) total_area)
         // + " %)"
         );
-        LOGGER.fine("\t" + "rgb: " + Integer.toHexString(rgb) + ", " + "red: " + Integer.toHexString(mins[0] << 8 - precision) + ", "
-                + Integer.toHexString(maxs[0] << 8 - precision) + ", " + "green: " + Integer.toHexString(mins[1] << 8 - precision) + ", "
-                + Integer.toHexString(maxs[1] << 8 - precision) + ", " + "blue: " + Integer.toHexString(mins[2] << 8 - precision) + ", "
+        LOGGER.fine("\trgb: " + Integer.toHexString(rgb) + ", red: " + Integer.toHexString(mins[0] << 8 - precision) + ", "
+                + Integer.toHexString(maxs[0] << 8 - precision) + ", green: " + Integer.toHexString(mins[1] << 8 - precision) + ", "
+                + Integer.toHexString(maxs[1] << 8 - precision) + ", blue: " + Integer.toHexString(mins[2] << 8 - precision) + ", "
                 + Integer.toHexString(maxs[2] << 8 - precision));
-        LOGGER.fine("\t" + "red: " + mins[0] + ", " + maxs[0] + ", " + "green: " + mins[1] + ", " + maxs[1] + ", " + "blue: " + mins[2] + ", " + maxs[2]);
-        LOGGER.fine("\t" + "rdiff: " + rdiff + ", " + "gdiff: " + gdiff + ", " + "bdiff: " + bdiff + ", " + "colorArea: " + colorArea);
+        LOGGER.fine("\tred: " + mins[0] + ", " + maxs[0] + ", green: " + mins[1] + ", " + maxs[1] + ", blue: " + mins[2] + ", " + maxs[2]);
+        LOGGER.fine("\trdiff: " + rdiff + ", gdiff: " + gdiff + ", bdiff: " + bdiff + ", colorArea: " + colorArea);
     }
 
     public void dumpJustRgb(final String prefix) {
-        LOGGER.fine("\t" + "rgb: " + Integer.toHexString(rgb) + ", " + "red: " + Integer.toHexString(mins[0] << 8 - precision) + ", "
-                + Integer.toHexString(maxs[0] << 8 - precision) + ", " + "green: " + Integer.toHexString(mins[1] << 8 - precision) + ", "
-                + Integer.toHexString(maxs[1] << 8 - precision) + ", " + "blue: " + Integer.toHexString(mins[2] << 8 - precision) + ", "
+        LOGGER.fine("\trgb: " + Integer.toHexString(rgb) + ", red: " + Integer.toHexString(mins[0] << 8 - precision) + ", "
+                + Integer.toHexString(maxs[0] << 8 - precision) + ", green: " + Integer.toHexString(mins[1] << 8 - precision) + ", "
+                + Integer.toHexString(maxs[1] << 8 - precision) + ", blue: " + Integer.toHexString(mins[2] << 8 - precision) + ", "
                 + Integer.toHexString(maxs[2] << 8 - precision));
     }
 
diff --git a/src/main/java/org/apache/commons/imaging/palette/PaletteFactory.java b/src/main/java/org/apache/commons/imaging/palette/PaletteFactory.java
index ed27adf8..8ea7c4b9 100644
--- a/src/main/java/org/apache/commons/imaging/palette/PaletteFactory.java
+++ b/src/main/java/org/apache/commons/imaging/palette/PaletteFactory.java
@@ -125,7 +125,7 @@ public class PaletteFactory {
                 return;
             }
             if (LOGGER.isLoggable(Level.FINEST)) {
-                LOGGER.finest("\t" + "area: " + maxArea);
+                LOGGER.finest("\tarea: " + maxArea);
             }
 
             final DivisionCandidate dc = divideSubset2(table, maxSubset, precision);
diff --git a/src/test/java/org/apache/commons/imaging/ImageInfoTest.java b/src/test/java/org/apache/commons/imaging/ImageInfoTest.java
index f5e74a75..68f155a5 100644
--- a/src/test/java/org/apache/commons/imaging/ImageInfoTest.java
+++ b/src/test/java/org/apache/commons/imaging/ImageInfoTest.java
@@ -90,10 +90,26 @@ class ImageInfoTest {
     void testToStringEmptyComments() {
         final ImageInfo imageInfo = new ImageInfo(null, 0, new ArrayList<>(), ImageFormats.DCX, null, 0, null, 0, 0, 0.0f, 0, 0.0f, 0, false, false, false,
                 ColorType.BW, null);
-        final String expected = "Format Details: null\n" + "Bits Per Pixel: 0\n" + "Comments: 0\n" + "Format: DCX\n" + "Format Name: null\n"
-                + "Compression Algorithm: null\n" + "Height: 0\n" + "MimeType: null\n" + "Number Of Images: 0\n" + "Physical Height Dpi: 0\n"
-                + "Physical Height Inch: 0.0\n" + "Physical Width Dpi: 0\n" + "Physical Width Inch: 0.0\n" + "Width: 0\n" + "Is Progressive: false\n"
-                + "Is Transparent: false\n" + "Color Type: Black and White\n" + "Uses Palette: false\n";
+        // @formatter:off
+        final String expected = "Format Details: null\n"
+                + "Bits Per Pixel: 0\n"
+                + "Comments: 0\n"
+                + "Format: DCX\n"
+                + "Format Name: null\n"
+                + "Compression Algorithm: null\n"
+                + "Height: 0\n"
+                + "MimeType: null\n"
+                + "Number Of Images: 0\n"
+                + "Physical Height Dpi: 0\n"
+                + "Physical Height Inch: 0.0\n"
+                + "Physical Width Dpi: 0\n"
+                + "Physical Width Inch: 0.0\n"
+                + "Width: 0\n"
+                + "Is Progressive: false\n"
+                + "Is Transparent: false\n"
+                + "Color Type: Black and White\n"
+                + "Uses Palette: false\n";
+        // @formatter:on
         final String testString = imageInfo.toString().replaceAll("\\r", "");
         assertEquals(expected, testString);
     }
@@ -122,10 +138,28 @@ class ImageInfoTest {
     void testToStringWithComments() {
         final ImageInfo imageInfo = new ImageInfo(null, 0, Arrays.asList("a", "b"), ImageFormats.DCX, null, 0, null, 0, 0, 0.0f, 0, 0.0f, 0, false, false,
                 false, ColorType.BW, null);
-        final String expected = "Format Details: null\n" + "Bits Per Pixel: 0\n" + "Comments: 2\n" + "\t0: 'a'\n" + "\t1: 'b'\n" + "Format: DCX\n"
-                + "Format Name: null\n" + "Compression Algorithm: null\n" + "Height: 0\n" + "MimeType: null\n" + "Number Of Images: 0\n"
-                + "Physical Height Dpi: 0\n" + "Physical Height Inch: 0.0\n" + "Physical Width Dpi: 0\n" + "Physical Width Inch: 0.0\n" + "Width: 0\n"
-                + "Is Progressive: false\n" + "Is Transparent: false\n" + "Color Type: Black and White\n" + "Uses Palette: false\n";
+        // @formatter:off
+        final String expected = "Format Details: null\n"
+                + "Bits Per Pixel: 0\n"
+                + "Comments: 2\n"
+                + "\t0: 'a'\n"
+                + "\t1: 'b'\n"
+                + "Format: DCX\n"
+                + "Format Name: null\n"
+                + "Compression Algorithm: null\n"
+                + "Height: 0\n"
+                + "MimeType: null\n"
+                + "Number Of Images: 0\n"
+                + "Physical Height Dpi: 0\n"
+                + "Physical Height Inch: 0.0\n"
+                + "Physical Width Dpi: 0\n"
+                + "Physical Width Inch: 0.0\n"
+                + "Width: 0\n"
+                + "Is Progressive: false\n"
+                + "Is Transparent: false\n"
+                + "Color Type: Black and White\n"
+                + "Uses Palette: false\n";
+        // @formatter:on
         final String testString = imageInfo.toString().replaceAll("\\r", "");
         assertEquals(expected, testString);
     }
diff --git a/src/test/java/org/apache/commons/imaging/examples/MetadataExample.java b/src/test/java/org/apache/commons/imaging/examples/MetadataExample.java
index af4b28ab..fc05a880 100644
--- a/src/test/java/org/apache/commons/imaging/examples/MetadataExample.java
+++ b/src/test/java/org/apache/commons/imaging/examples/MetadataExample.java
@@ -131,7 +131,7 @@ public class MetadataExample {
     private static void printTagValue(final JpegImageMetadata jpegMetadata, final TagInfo tagInfo) {
         final TiffField field = jpegMetadata.findExifValueWithExactMatch(tagInfo);
         if (field == null) {
-            System.out.println(tagInfo.name + ": " + "Not Found.");
+            System.out.println(tagInfo.name + ": Not Found.");
         } else {
             System.out.println(tagInfo.name + ": " + field.getValueDescription());
         }
diff --git a/src/test/java/org/apache/commons/imaging/examples/tiff/SurveyTiffFile.java b/src/test/java/org/apache/commons/imaging/examples/tiff/SurveyTiffFile.java
index 570ce452..74ae5969 100644
--- a/src/test/java/org/apache/commons/imaging/examples/tiff/SurveyTiffFile.java
+++ b/src/test/java/org/apache/commons/imaging/examples/tiff/SurveyTiffFile.java
@@ -68,7 +68,7 @@ public class SurveyTiffFile {
         final int k1 = n - 4 - k0;
 
         final String header = String.format("%" + k0 + "sPath%" + k1 + "s%s", "", "",
-                "    Size     Layout  Blk_sz     P_conf  Compress  " + "Predict  Data_Fmt   B/P B/S      Photo     ICC_Pro");
+                "    Size     Layout  Blk_sz     P_conf  Compress  Predict  Data_Fmt   B/P B/S      Photo     ICC_Pro");
         if (csv) {
             return reformatHeaderForCsv(header);
         }
diff --git a/src/test/java/org/apache/commons/imaging/formats/bmp/BmpRoundtripTest.java b/src/test/java/org/apache/commons/imaging/formats/bmp/BmpRoundtripTest.java
index beecebbd..96d2df53 100644
--- a/src/test/java/org/apache/commons/imaging/formats/bmp/BmpRoundtripTest.java
+++ b/src/test/java/org/apache/commons/imaging/formats/bmp/BmpRoundtripTest.java
@@ -60,7 +60,7 @@ class BmpRoundtripTest extends AbstractBmpTest {
                 final int rgbB = 0xffffff & b[y][x];
 
                 if (rgbA != rgbB) {
-                    Debug.debug("x: " + x + ", y: " + y + ", rgbA: " + rgbA + " (0x" + Integer.toHexString(rgbA) + ")" + ", rgbB: " + rgbB + " (0x"
+                    Debug.debug("x: " + x + ", y: " + y + ", rgbA: " + rgbA + " (0x" + Integer.toHexString(rgbA) + "), rgbB: " + rgbB + " (0x"
                             + Integer.toHexString(rgbB) + ")");
                 }
                 assertEquals(rgbA, rgbB);
diff --git a/src/test/java/org/apache/commons/imaging/formats/icns/IcnsRoundTripTest.java b/src/test/java/org/apache/commons/imaging/formats/icns/IcnsRoundTripTest.java
index 946a52f6..0d2162f6 100644
--- a/src/test/java/org/apache/commons/imaging/formats/icns/IcnsRoundTripTest.java
+++ b/src/test/java/org/apache/commons/imaging/formats/icns/IcnsRoundTripTest.java
@@ -399,7 +399,7 @@ class IcnsRoundTripTest extends AbstractIcnsTest {
                 final int dataARGB = data.getRGB(x, y);
 
                 if (imageARGB != dataARGB) {
-                    Debug.debug("x: " + x + ", y: " + y + ", image: " + imageARGB + " (0x" + Integer.toHexString(imageARGB) + ")" + ", data: " + dataARGB
+                    Debug.debug("x: " + x + ", y: " + y + ", image: " + imageARGB + " (0x" + Integer.toHexString(imageARGB) + "), data: " + dataARGB
                             + " (0x" + Integer.toHexString(dataARGB) + ")");
                 }
                 assertEquals(imageARGB, dataARGB);
diff --git a/src/test/java/org/apache/commons/imaging/formats/ico/IcoRoundtripTest.java b/src/test/java/org/apache/commons/imaging/formats/ico/IcoRoundtripTest.java
index dfe032e9..4ae11f38 100644
--- a/src/test/java/org/apache/commons/imaging/formats/ico/IcoRoundtripTest.java
+++ b/src/test/java/org/apache/commons/imaging/formats/ico/IcoRoundtripTest.java
@@ -441,7 +441,7 @@ class IcoRoundtripTest extends AbstractIcoTest {
                 final int dataARGB = data.getRGB(x, y);
 
                 if (imageARGB != dataARGB) {
-                    Debug.debug("x: " + x + ", y: " + y + ", image: " + imageARGB + " (0x" + Integer.toHexString(imageARGB) + ")" + ", data: " + dataARGB
+                    Debug.debug("x: " + x + ", y: " + y + ", image: " + imageARGB + " (0x" + Integer.toHexString(imageARGB) + "), data: " + dataARGB
                             + " (0x" + Integer.toHexString(dataARGB) + ")");
                 }
                 assertEquals(imageARGB, dataARGB);
diff --git a/src/test/java/org/apache/commons/imaging/roundtrip/FormatInfo.java b/src/test/java/org/apache/commons/imaging/roundtrip/FormatInfo.java
index 74ee355f..d3b8a4e4 100644
--- a/src/test/java/org/apache/commons/imaging/roundtrip/FormatInfo.java
+++ b/src/test/java/org/apache/commons/imaging/roundtrip/FormatInfo.java
@@ -91,7 +91,7 @@ final class FormatInfo {
 
     @Override
     public String toString() {
-        return "FormatInfo{" + "format=" + format + ", canRead=" + canRead + ", canWrite=" + canWrite + ", colorSupport=" + colorSupport
+        return "FormatInfo{format=" + format + ", canRead=" + canRead + ", canWrite=" + canWrite + ", colorSupport=" + colorSupport
                 + ", identicalSecondWrite=" + identicalSecondWrite + ", preservesResolution=" + preservesResolution + '}';
     }
 }