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
The following commit(s) were added to refs/heads/master by this push: new 4167f07e Format: "catch(" -> "catch (" 4167f07e is described below commit 4167f07ec59e248cd2ddea88f062a51f709043a6 Author: Gary Gregory <garydgreg...@gmail.com> AuthorDate: Tue Apr 18 10:40:31 2023 -0400 Format: "catch(" -> "catch (" --- src/test/java/org/apache/commons/imaging/common/ImageBuilderTest.java | 4 ++-- .../apache/commons/imaging/common/RgbBufferedImageFactoryTest.java | 2 +- .../apache/commons/imaging/formats/jpeg/segments/JfifSegmentTest.java | 2 +- .../apache/commons/imaging/formats/jpeg/xmp/JpegXmpParserTest.java | 2 +- .../java/org/apache/commons/imaging/formats/pcx/RleReaderTest.java | 2 +- .../apache/commons/imaging/formats/png/chunks/PngChunkTextTest.java | 2 +- .../png/transparencyfilters/TransparencyFilterIndexedColorTest.java | 2 +- .../java/org/apache/commons/imaging/formats/pnm/PbmFileInfoTest.java | 2 +- .../imaging/formats/psd/dataparsers/DataParserIndexedTest.java | 2 +- .../apache/commons/imaging/formats/tiff/TiffRasterDataIntTest.java | 4 ++-- .../org/apache/commons/imaging/formats/tiff/TiffSubImageTest.java | 2 +- .../apache/commons/imaging/formats/tiff/fieldtypes/FieldTypeTest.java | 2 +- 12 files changed, 14 insertions(+), 14 deletions(-) diff --git a/src/test/java/org/apache/commons/imaging/common/ImageBuilderTest.java b/src/test/java/org/apache/commons/imaging/common/ImageBuilderTest.java index 9caf9941..2f2fab96 100644 --- a/src/test/java/org/apache/commons/imaging/common/ImageBuilderTest.java +++ b/src/test/java/org/apache/commons/imaging/common/ImageBuilderTest.java @@ -116,7 +116,7 @@ public class ImageBuilderTest { try{ final ImageBuilder sub = imageBuilder.getSubset(x, y, w, h); fail("Failed to detect bad bounds "+x+", "+y+", "+w+", "+h); - }catch(final RasterFormatException rfe){ + }catch (final RasterFormatException rfe){ // success, no action required } } @@ -125,7 +125,7 @@ public class ImageBuilderTest { try{ final ImageBuilder iBuilder = new ImageBuilder(w, h, true); fail("Failed to detect bad constructor "+w+", "+h); - }catch(final RasterFormatException rfe){ + }catch (final RasterFormatException rfe){ // success, no action required } } diff --git a/src/test/java/org/apache/commons/imaging/common/RgbBufferedImageFactoryTest.java b/src/test/java/org/apache/commons/imaging/common/RgbBufferedImageFactoryTest.java index c1347f3d..5c352998 100644 --- a/src/test/java/org/apache/commons/imaging/common/RgbBufferedImageFactoryTest.java +++ b/src/test/java/org/apache/commons/imaging/common/RgbBufferedImageFactoryTest.java @@ -32,7 +32,7 @@ public class RgbBufferedImageFactoryTest{ try { rgbBufferedImageFactory.getColorBufferedImage(0, 0, true); fail("Expecting exception: IllegalArgumentException"); - } catch(final IllegalArgumentException e) { + } catch (final IllegalArgumentException e) { assertEquals("Width (0) and height (0) cannot be <= 0",e.getMessage()); assertEquals(DirectColorModel.class.getName(), e.getStackTrace()[0].getClassName()); } diff --git a/src/test/java/org/apache/commons/imaging/formats/jpeg/segments/JfifSegmentTest.java b/src/test/java/org/apache/commons/imaging/formats/jpeg/segments/JfifSegmentTest.java index e16f7ff1..3b39bf5a 100644 --- a/src/test/java/org/apache/commons/imaging/formats/jpeg/segments/JfifSegmentTest.java +++ b/src/test/java/org/apache/commons/imaging/formats/jpeg/segments/JfifSegmentTest.java @@ -33,7 +33,7 @@ public class JfifSegmentTest{ try { new JfifSegment((-2275), byteArray); fail("Expecting exception: Exception"); - } catch(final ImageReadException e) { + } catch (final ImageReadException e) { assertEquals("Not a Valid JPEG File: missing JFIF string",e.getMessage()); assertEquals(JfifSegment.class.getName(), e.getStackTrace()[0].getClassName()); } diff --git a/src/test/java/org/apache/commons/imaging/formats/jpeg/xmp/JpegXmpParserTest.java b/src/test/java/org/apache/commons/imaging/formats/jpeg/xmp/JpegXmpParserTest.java index 7c272f14..6fe87ffd 100644 --- a/src/test/java/org/apache/commons/imaging/formats/jpeg/xmp/JpegXmpParserTest.java +++ b/src/test/java/org/apache/commons/imaging/formats/jpeg/xmp/JpegXmpParserTest.java @@ -31,7 +31,7 @@ public class JpegXmpParserTest{ try { jpegXmpParser.parseXmpJpegSegment(byteArray); fail("Expecting exception: Exception"); - } catch(final Exception e) { + } catch (final Exception e) { assertEquals("Invalid JPEG XMP Segment.",e.getMessage()); assertEquals(JpegXmpParser.class.getName(), e.getStackTrace()[0].getClassName()); } diff --git a/src/test/java/org/apache/commons/imaging/formats/pcx/RleReaderTest.java b/src/test/java/org/apache/commons/imaging/formats/pcx/RleReaderTest.java index 651a8eef..8d8b6fbb 100644 --- a/src/test/java/org/apache/commons/imaging/formats/pcx/RleReaderTest.java +++ b/src/test/java/org/apache/commons/imaging/formats/pcx/RleReaderTest.java @@ -34,7 +34,7 @@ public class RleReaderTest{ try { rleReader.read(byteArrayInputStream, byteArray); fail("Expecting exception: Exception"); - } catch(final Exception e) { + } catch (final Exception e) { assertEquals("Premature end of file reading image data",e.getMessage()); assertEquals(RleReader.class.getName(), e.getStackTrace()[0].getClassName()); } diff --git a/src/test/java/org/apache/commons/imaging/formats/png/chunks/PngChunkTextTest.java b/src/test/java/org/apache/commons/imaging/formats/png/chunks/PngChunkTextTest.java index 2f7dfff3..07e14f60 100644 --- a/src/test/java/org/apache/commons/imaging/formats/png/chunks/PngChunkTextTest.java +++ b/src/test/java/org/apache/commons/imaging/formats/png/chunks/PngChunkTextTest.java @@ -30,7 +30,7 @@ public class PngChunkTextTest{ try { new PngChunkText(1214, 1214, 0, byteArray); fail("Expecting exception: Exception"); - } catch(final Throwable e) { + } catch (final Throwable e) { assertEquals("PNG tEXt chunk keyword is not terminated.",e.getMessage()); assertEquals(PngChunkText.class.getName(), e.getStackTrace()[0].getClassName()); } diff --git a/src/test/java/org/apache/commons/imaging/formats/png/transparencyfilters/TransparencyFilterIndexedColorTest.java b/src/test/java/org/apache/commons/imaging/formats/png/transparencyfilters/TransparencyFilterIndexedColorTest.java index 15bb5355..05ae52ee 100644 --- a/src/test/java/org/apache/commons/imaging/formats/png/transparencyfilters/TransparencyFilterIndexedColorTest.java +++ b/src/test/java/org/apache/commons/imaging/formats/png/transparencyfilters/TransparencyFilterIndexedColorTest.java @@ -32,7 +32,7 @@ public class TransparencyFilterIndexedColorTest{ try { transparencyFilterIndexedColor.filter((-416), (-398)); fail("Expecting exception: Exception"); - } catch(final Exception e) { + } catch (final Exception e) { assertEquals("TransparencyFilterIndexedColor index: -398, bytes.length: 0",e.getMessage()); assertEquals(TransparencyFilterIndexedColor.class.getName(), e.getStackTrace()[0].getClassName()); } diff --git a/src/test/java/org/apache/commons/imaging/formats/pnm/PbmFileInfoTest.java b/src/test/java/org/apache/commons/imaging/formats/pnm/PbmFileInfoTest.java index 14c87adf..78ab8be0 100644 --- a/src/test/java/org/apache/commons/imaging/formats/pnm/PbmFileInfoTest.java +++ b/src/test/java/org/apache/commons/imaging/formats/pnm/PbmFileInfoTest.java @@ -37,7 +37,7 @@ public class PbmFileInfoTest{ try { pbmFileInfo.getRGB(inputStream); fail("Expecting exception: IOException"); - } catch(final IOException e) { + } catch (final IOException e) { assertEquals("PBM: Unexpected EOF",e.getMessage()); assertEquals(PbmFileInfo.class.getName(), e.getStackTrace()[0].getClassName()); } diff --git a/src/test/java/org/apache/commons/imaging/formats/psd/dataparsers/DataParserIndexedTest.java b/src/test/java/org/apache/commons/imaging/formats/psd/dataparsers/DataParserIndexedTest.java index 58436bab..8d68c922 100644 --- a/src/test/java/org/apache/commons/imaging/formats/psd/dataparsers/DataParserIndexedTest.java +++ b/src/test/java/org/apache/commons/imaging/formats/psd/dataparsers/DataParserIndexedTest.java @@ -30,7 +30,7 @@ public class DataParserIndexedTest{ try { new DataParserIndexed(byteArray); fail("Expecting exception: ArrayIndexOutOfBoundsException"); - } catch(final ArrayIndexOutOfBoundsException e) { + } catch (final ArrayIndexOutOfBoundsException e) { assertTrue(e.getMessage().contains("256")); assertEquals(DataParserIndexed.class.getName(), e.getStackTrace()[0].getClassName()); } diff --git a/src/test/java/org/apache/commons/imaging/formats/tiff/TiffRasterDataIntTest.java b/src/test/java/org/apache/commons/imaging/formats/tiff/TiffRasterDataIntTest.java index 51feea8d..8a79b97b 100644 --- a/src/test/java/org/apache/commons/imaging/formats/tiff/TiffRasterDataIntTest.java +++ b/src/test/java/org/apache/commons/imaging/formats/tiff/TiffRasterDataIntTest.java @@ -213,7 +213,7 @@ public class TiffRasterDataIntTest { final TiffRasterData raster = new TiffRasterDataInt(10, 10, sample); raster.getIntValue(11, 11); fail("Access method getValue() did not detect bad coordinates"); - }catch(final IllegalArgumentException illArgEx){ + }catch (final IllegalArgumentException illArgEx){ // success! } try{ @@ -221,7 +221,7 @@ public class TiffRasterDataIntTest { final TiffRasterData raster = new TiffRasterDataInt(10, 10, sample); raster.setValue(11, 11, 5.0f); fail("Access method setValue() did not detect bad coordinates"); - }catch(final IllegalArgumentException illArgEx){ + }catch (final IllegalArgumentException illArgEx){ // success! } } diff --git a/src/test/java/org/apache/commons/imaging/formats/tiff/TiffSubImageTest.java b/src/test/java/org/apache/commons/imaging/formats/tiff/TiffSubImageTest.java index e738cf3c..5784704e 100644 --- a/src/test/java/org/apache/commons/imaging/formats/tiff/TiffSubImageTest.java +++ b/src/test/java/org/apache/commons/imaging/formats/tiff/TiffSubImageTest.java @@ -84,7 +84,7 @@ public class TiffSubImageTest extends TiffBaseTest { params.setSubImage(x, y, width, height); tiffImageParser.getBufferedImage(target, params); fail("Reading TIFF sub-image failed to detect bad parameter: "+comment); - }catch(final ImageReadException | IllegalArgumentException ire){ + }catch (final ImageReadException | IllegalArgumentException ire){ // the test passed } } diff --git a/src/test/java/org/apache/commons/imaging/formats/tiff/fieldtypes/FieldTypeTest.java b/src/test/java/org/apache/commons/imaging/formats/tiff/fieldtypes/FieldTypeTest.java index f094e264..6c4f73e8 100644 --- a/src/test/java/org/apache/commons/imaging/formats/tiff/fieldtypes/FieldTypeTest.java +++ b/src/test/java/org/apache/commons/imaging/formats/tiff/fieldtypes/FieldTypeTest.java @@ -28,7 +28,7 @@ public class FieldTypeTest{ try { FieldType.getFieldType((-748)); fail("Expecting exception: Exception"); - } catch(final Exception e) { + } catch (final Exception e) { assertEquals("Field type -748 is unsupported",e.getMessage()); assertEquals(FieldType.class.getName(), e.getStackTrace()[0].getClassName()); }