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 def13a02 Sort imports and enforce through Checkstyle def13a02 is described below commit def13a02d47c7dcea4bdf13c3823a5a14b4ec093 Author: Gary Gregory <garydgreg...@gmail.com> AuthorDate: Mon Oct 9 07:59:31 2023 -0400 Sort imports and enforce through Checkstyle --- src/conf/checkstyle.xml | 6 +++++ .../imaging/formats/bmp/BmpImageParser.java | 2 +- .../imaging/formats/dcx/DcxImageParser.java | 2 +- .../imaging/formats/gif/GifImageParser.java | 2 +- .../imaging/formats/icns/IcnsImageParser.java | 2 +- .../imaging/formats/ico/IcoImageParser.java | 2 +- .../imaging/formats/jpeg/JpegImageMetadata.java | 2 +- .../imaging/formats/jpeg/JpegImageParser.java | 4 ++-- .../imaging/formats/pcx/PcxImageParser.java | 2 +- .../imaging/formats/png/PngImageParser.java | 4 ++-- .../imaging/formats/png/chunks/PngChunkItxt.java | 2 +- .../imaging/formats/png/chunks/PngChunkZtxt.java | 2 +- .../imaging/formats/pnm/PnmImageParser.java | 2 +- .../imaging/formats/psd/PsdImageParser.java | 2 +- .../imaging/formats/rgbe/RgbeImageParser.java | 2 +- .../imaging/formats/tiff/TiffImageParser.java | 8 +++---- .../commons/imaging/formats/tiff/TiffReader.java | 1 + .../formats/tiff/datareaders/DataReaderStrips.java | 2 +- .../formats/tiff/datareaders/DataReaderTiled.java | 2 +- .../tiff/write/TiffImageWriterLossless.java | 6 ++--- .../formats/tiff/write/TiffOutputDirectory.java | 4 ++-- .../imaging/formats/wbmp/WbmpImageParser.java | 2 +- .../imaging/formats/webp/WebPChunkType.java | 4 ++-- .../imaging/formats/webp/WebPImageMetadata.java | 6 ++--- .../imaging/formats/webp/WebPImageParser.java | 26 +++++++++++----------- .../imaging/formats/webp/chunks/WebPChunk.java | 8 +++---- .../imaging/formats/webp/chunks/WebPChunkExif.java | 6 ++--- .../imaging/formats/webp/chunks/WebPChunkVp8.java | 4 ++-- .../imaging/formats/webp/chunks/WebPChunkVp8l.java | 6 ++--- .../imaging/formats/webp/chunks/WebPChunkVp8x.java | 4 ++-- .../imaging/formats/webp/chunks/WebPChunkXml.java | 4 ++-- .../imaging/formats/xbm/XbmImageParser.java | 2 +- .../imaging/formats/xpm/XpmImageParser.java | 2 +- .../imaging/internal/ImageParserFactory.java | 2 +- .../imaging/bytesource/AbstractByteSourceTest.java | 2 +- .../imaging/bytesource/ByteSourceImageTest.java | 2 +- .../imaging/formats/bmp/AbstractBmpTest.java | 2 +- .../imaging/formats/dcx/AbstractDcxTest.java | 2 +- .../imaging/formats/gif/AbstractGifTest.java | 2 +- .../commons/imaging/formats/icns/IcnsBaseTest.java | 2 +- .../imaging/formats/ico/AbstractIcoTest.java | 2 +- .../commons/imaging/formats/jpeg/JpegBaseTest.java | 2 +- .../formats/jpeg/JpegWithJpegThumbnailTest.java | 2 +- .../formats/jpeg/exif/AbstractExifTest.java | 2 +- .../imaging/formats/jpeg/iptc/IptcBaseTest.java | 2 +- .../formats/jpeg/xmp/AbstractJpegXmpTest.java | 2 +- .../imaging/formats/pam/AbstractPamTest.java | 2 +- .../imaging/formats/pcx/AbstractPcxTest.java | 2 +- .../imaging/formats/png/AbstractPngTest.java | 2 +- .../imaging/formats/png/PngWriteReadTest.java | 2 +- .../imaging/formats/psd/AbstractPsdTest.java | 2 +- .../commons/imaging/formats/rgbe/RgbeBaseTest.java | 2 +- .../commons/imaging/formats/tiff/TiffBaseTest.java | 2 +- .../imaging/formats/tiff/TiffBigTiffTest.java | 4 ++-- .../formats/tiff/TiffRasterDataIntTest.java | 1 - .../commons/imaging/formats/wbmp/WbmpBaseTest.java | 2 +- .../commons/imaging/formats/webp/WebPBaseTest.java | 10 ++++----- .../commons/imaging/formats/webp/WebPDumpTest.java | 12 +++++----- .../imaging/formats/webp/WebPMetadataTest.java | 12 +++++----- .../commons/imaging/formats/webp/WebPReadTest.java | 16 ++++++------- .../commons/imaging/formats/xbm/XbmBaseTest.java | 2 +- .../commons/imaging/formats/xmp/XmpDumpTest.java | 2 +- .../commons/imaging/formats/xmp/XmpUpdateTest.java | 4 ++-- .../imaging/formats/xpm/AbstractXpmTest.java | 2 +- .../imaging/palette/PaletteQuantizationTest.java | 2 +- 65 files changed, 125 insertions(+), 119 deletions(-) diff --git a/src/conf/checkstyle.xml b/src/conf/checkstyle.xml index 3a96d9fe..44aa2940 100644 --- a/src/conf/checkstyle.xml +++ b/src/conf/checkstyle.xml @@ -56,6 +56,12 @@ limitations under the License. <module name="LeftCurly"/> <module name="NeedBraces"/> <module name="RightCurly"/> + <module name="ImportOrder"> + <property name="option" value="top"/> + <property name="groups" value="java,javax,org"/> + <property name="ordered" value="true"/> + <property name="separated" value="true"/> + </module> </module> <module name="LineLength"> <property name="max" value="160" /> diff --git a/src/main/java/org/apache/commons/imaging/formats/bmp/BmpImageParser.java b/src/main/java/org/apache/commons/imaging/formats/bmp/BmpImageParser.java index 0a0f8746..23fca47d 100644 --- a/src/main/java/org/apache/commons/imaging/formats/bmp/BmpImageParser.java +++ b/src/main/java/org/apache/commons/imaging/formats/bmp/BmpImageParser.java @@ -34,11 +34,11 @@ import java.util.List; import java.util.logging.Level; import java.util.logging.Logger; +import org.apache.commons.imaging.AbstractImageParser; import org.apache.commons.imaging.FormatCompliance; import org.apache.commons.imaging.ImageFormat; import org.apache.commons.imaging.ImageFormats; import org.apache.commons.imaging.ImageInfo; -import org.apache.commons.imaging.AbstractImageParser; import org.apache.commons.imaging.ImagingException; import org.apache.commons.imaging.PixelDensity; import org.apache.commons.imaging.bytesource.ByteSource; diff --git a/src/main/java/org/apache/commons/imaging/formats/dcx/DcxImageParser.java b/src/main/java/org/apache/commons/imaging/formats/dcx/DcxImageParser.java index 214502fd..8168ab40 100644 --- a/src/main/java/org/apache/commons/imaging/formats/dcx/DcxImageParser.java +++ b/src/main/java/org/apache/commons/imaging/formats/dcx/DcxImageParser.java @@ -28,10 +28,10 @@ import java.nio.ByteOrder; import java.util.ArrayList; import java.util.List; +import org.apache.commons.imaging.AbstractImageParser; import org.apache.commons.imaging.ImageFormat; import org.apache.commons.imaging.ImageFormats; import org.apache.commons.imaging.ImageInfo; -import org.apache.commons.imaging.AbstractImageParser; import org.apache.commons.imaging.ImagingException; import org.apache.commons.imaging.bytesource.ByteSource; import org.apache.commons.imaging.common.Allocator; diff --git a/src/main/java/org/apache/commons/imaging/formats/gif/GifImageParser.java b/src/main/java/org/apache/commons/imaging/formats/gif/GifImageParser.java index a8f48062..02144176 100644 --- a/src/main/java/org/apache/commons/imaging/formats/gif/GifImageParser.java +++ b/src/main/java/org/apache/commons/imaging/formats/gif/GifImageParser.java @@ -37,11 +37,11 @@ import java.util.List; import java.util.logging.Level; import java.util.logging.Logger; +import org.apache.commons.imaging.AbstractImageParser; import org.apache.commons.imaging.FormatCompliance; import org.apache.commons.imaging.ImageFormat; import org.apache.commons.imaging.ImageFormats; import org.apache.commons.imaging.ImageInfo; -import org.apache.commons.imaging.AbstractImageParser; import org.apache.commons.imaging.ImagingException; import org.apache.commons.imaging.bytesource.ByteSource; import org.apache.commons.imaging.common.Allocator; 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 f9135c04..9a37329c 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 @@ -28,10 +28,10 @@ import java.io.PrintWriter; import java.util.ArrayList; import java.util.List; +import org.apache.commons.imaging.AbstractImageParser; import org.apache.commons.imaging.ImageFormat; import org.apache.commons.imaging.ImageFormats; import org.apache.commons.imaging.ImageInfo; -import org.apache.commons.imaging.AbstractImageParser; import org.apache.commons.imaging.ImagingException; import org.apache.commons.imaging.bytesource.ByteSource; import org.apache.commons.imaging.common.BinaryOutputStream; diff --git a/src/main/java/org/apache/commons/imaging/formats/ico/IcoImageParser.java b/src/main/java/org/apache/commons/imaging/formats/ico/IcoImageParser.java index c3e0614e..fc2a4ca4 100644 --- a/src/main/java/org/apache/commons/imaging/formats/ico/IcoImageParser.java +++ b/src/main/java/org/apache/commons/imaging/formats/ico/IcoImageParser.java @@ -32,10 +32,10 @@ import java.io.PrintWriter; import java.nio.ByteOrder; import java.util.List; +import org.apache.commons.imaging.AbstractImageParser; import org.apache.commons.imaging.ImageFormat; import org.apache.commons.imaging.ImageFormats; import org.apache.commons.imaging.ImageInfo; -import org.apache.commons.imaging.AbstractImageParser; import org.apache.commons.imaging.Imaging; import org.apache.commons.imaging.ImagingException; import org.apache.commons.imaging.PixelDensity; diff --git a/src/main/java/org/apache/commons/imaging/formats/jpeg/JpegImageMetadata.java b/src/main/java/org/apache/commons/imaging/formats/jpeg/JpegImageMetadata.java index 5302cb0d..2cc2dd9a 100644 --- a/src/main/java/org/apache/commons/imaging/formats/jpeg/JpegImageMetadata.java +++ b/src/main/java/org/apache/commons/imaging/formats/jpeg/JpegImageMetadata.java @@ -28,9 +28,9 @@ import javax.imageio.ImageIO; import org.apache.commons.imaging.Imaging; import org.apache.commons.imaging.ImagingException; import org.apache.commons.imaging.common.ImageMetadata; +import org.apache.commons.imaging.formats.tiff.AbstractTiffImageData; import org.apache.commons.imaging.formats.tiff.JpegImageData; import org.apache.commons.imaging.formats.tiff.TiffField; -import org.apache.commons.imaging.formats.tiff.AbstractTiffImageData; import org.apache.commons.imaging.formats.tiff.TiffImageMetadata; import org.apache.commons.imaging.formats.tiff.taginfos.TagInfo; import org.apache.commons.imaging.internal.Debug; 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 15ca6b6e..bdcda4d2 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 @@ -31,10 +31,10 @@ import java.util.List; import java.util.logging.Level; import java.util.logging.Logger; +import org.apache.commons.imaging.AbstractImageParser; import org.apache.commons.imaging.ImageFormat; import org.apache.commons.imaging.ImageFormats; import org.apache.commons.imaging.ImageInfo; -import org.apache.commons.imaging.AbstractImageParser; import org.apache.commons.imaging.ImagingException; import org.apache.commons.imaging.bytesource.ByteSource; import org.apache.commons.imaging.common.Allocator; @@ -44,6 +44,7 @@ import org.apache.commons.imaging.common.XmpImagingParameters; import org.apache.commons.imaging.formats.jpeg.decoder.JpegDecoder; import org.apache.commons.imaging.formats.jpeg.iptc.IptcParser; import org.apache.commons.imaging.formats.jpeg.iptc.PhotoshopApp13Data; +import org.apache.commons.imaging.formats.jpeg.segments.AbstractSegment; import org.apache.commons.imaging.formats.jpeg.segments.App13Segment; import org.apache.commons.imaging.formats.jpeg.segments.App14Segment; import org.apache.commons.imaging.formats.jpeg.segments.App2Segment; @@ -51,7 +52,6 @@ import org.apache.commons.imaging.formats.jpeg.segments.ComSegment; import org.apache.commons.imaging.formats.jpeg.segments.DqtSegment; import org.apache.commons.imaging.formats.jpeg.segments.GenericSegment; import org.apache.commons.imaging.formats.jpeg.segments.JfifSegment; -import org.apache.commons.imaging.formats.jpeg.segments.AbstractSegment; import org.apache.commons.imaging.formats.jpeg.segments.SofnSegment; import org.apache.commons.imaging.formats.jpeg.segments.UnknownSegment; import org.apache.commons.imaging.formats.jpeg.xmp.JpegXmpParser; diff --git a/src/main/java/org/apache/commons/imaging/formats/pcx/PcxImageParser.java b/src/main/java/org/apache/commons/imaging/formats/pcx/PcxImageParser.java index 13369431..19a3a759 100644 --- a/src/main/java/org/apache/commons/imaging/formats/pcx/PcxImageParser.java +++ b/src/main/java/org/apache/commons/imaging/formats/pcx/PcxImageParser.java @@ -40,10 +40,10 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.Properties; +import org.apache.commons.imaging.AbstractImageParser; import org.apache.commons.imaging.ImageFormat; import org.apache.commons.imaging.ImageFormats; import org.apache.commons.imaging.ImageInfo; -import org.apache.commons.imaging.AbstractImageParser; import org.apache.commons.imaging.ImagingException; import org.apache.commons.imaging.bytesource.ByteSource; import org.apache.commons.imaging.common.Allocator; 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 350de909..daba11dd 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 @@ -34,11 +34,11 @@ import java.util.logging.Level; import java.util.logging.Logger; import java.util.zip.InflaterInputStream; +import org.apache.commons.imaging.AbstractImageParser; import org.apache.commons.imaging.ColorTools; import org.apache.commons.imaging.ImageFormat; import org.apache.commons.imaging.ImageFormats; import org.apache.commons.imaging.ImageInfo; -import org.apache.commons.imaging.AbstractImageParser; import org.apache.commons.imaging.ImagingException; import org.apache.commons.imaging.bytesource.ByteSource; import org.apache.commons.imaging.common.Allocator; @@ -47,6 +47,7 @@ import org.apache.commons.imaging.common.GenericImageMetadata; import org.apache.commons.imaging.common.ImageMetadata; import org.apache.commons.imaging.common.XmpEmbeddable; import org.apache.commons.imaging.common.XmpImagingParameters; +import org.apache.commons.imaging.formats.png.chunks.AbstractPngTextChunk; import org.apache.commons.imaging.formats.png.chunks.PngChunk; import org.apache.commons.imaging.formats.png.chunks.PngChunkGama; import org.apache.commons.imaging.formats.png.chunks.PngChunkIccp; @@ -58,7 +59,6 @@ import org.apache.commons.imaging.formats.png.chunks.PngChunkPlte; import org.apache.commons.imaging.formats.png.chunks.PngChunkScal; import org.apache.commons.imaging.formats.png.chunks.PngChunkText; import org.apache.commons.imaging.formats.png.chunks.PngChunkZtxt; -import org.apache.commons.imaging.formats.png.chunks.AbstractPngTextChunk; import org.apache.commons.imaging.formats.png.transparencyfilters.AbstractTransparencyFilter; import org.apache.commons.imaging.formats.png.transparencyfilters.TransparencyFilterGrayscale; import org.apache.commons.imaging.formats.png.transparencyfilters.TransparencyFilterIndexedColor; diff --git a/src/main/java/org/apache/commons/imaging/formats/png/chunks/PngChunkItxt.java b/src/main/java/org/apache/commons/imaging/formats/png/chunks/PngChunkItxt.java index 2f7ba713..68e52853 100644 --- a/src/main/java/org/apache/commons/imaging/formats/png/chunks/PngChunkItxt.java +++ b/src/main/java/org/apache/commons/imaging/formats/png/chunks/PngChunkItxt.java @@ -24,8 +24,8 @@ import java.util.zip.InflaterInputStream; import org.apache.commons.imaging.ImagingException; import org.apache.commons.imaging.common.Allocator; import org.apache.commons.imaging.common.BinaryFunctions; -import org.apache.commons.imaging.formats.png.PngConstants; import org.apache.commons.imaging.formats.png.AbstractPngText; +import org.apache.commons.imaging.formats.png.PngConstants; import org.apache.commons.io.IOUtils; public class PngChunkItxt extends AbstractPngTextChunk { diff --git a/src/main/java/org/apache/commons/imaging/formats/png/chunks/PngChunkZtxt.java b/src/main/java/org/apache/commons/imaging/formats/png/chunks/PngChunkZtxt.java index 93c261ad..63fffa07 100644 --- a/src/main/java/org/apache/commons/imaging/formats/png/chunks/PngChunkZtxt.java +++ b/src/main/java/org/apache/commons/imaging/formats/png/chunks/PngChunkZtxt.java @@ -24,8 +24,8 @@ import java.util.zip.InflaterInputStream; import org.apache.commons.imaging.ImagingException; import org.apache.commons.imaging.common.Allocator; import org.apache.commons.imaging.common.BinaryFunctions; -import org.apache.commons.imaging.formats.png.PngConstants; import org.apache.commons.imaging.formats.png.AbstractPngText; +import org.apache.commons.imaging.formats.png.PngConstants; import org.apache.commons.io.IOUtils; public class PngChunkZtxt extends AbstractPngTextChunk { diff --git a/src/main/java/org/apache/commons/imaging/formats/pnm/PnmImageParser.java b/src/main/java/org/apache/commons/imaging/formats/pnm/PnmImageParser.java index 2a060373..f8320461 100644 --- a/src/main/java/org/apache/commons/imaging/formats/pnm/PnmImageParser.java +++ b/src/main/java/org/apache/commons/imaging/formats/pnm/PnmImageParser.java @@ -29,10 +29,10 @@ import java.util.ArrayList; import java.util.List; import java.util.StringTokenizer; +import org.apache.commons.imaging.AbstractImageParser; import org.apache.commons.imaging.ImageFormat; import org.apache.commons.imaging.ImageFormats; import org.apache.commons.imaging.ImageInfo; -import org.apache.commons.imaging.AbstractImageParser; import org.apache.commons.imaging.ImagingException; import org.apache.commons.imaging.bytesource.ByteSource; import org.apache.commons.imaging.common.ImageBuilder; 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 410be712..3a7d4cd1 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 @@ -33,10 +33,10 @@ import java.nio.charset.StandardCharsets; import java.util.ArrayList; import java.util.List; +import org.apache.commons.imaging.AbstractImageParser; import org.apache.commons.imaging.ImageFormat; import org.apache.commons.imaging.ImageFormats; import org.apache.commons.imaging.ImageInfo; -import org.apache.commons.imaging.AbstractImageParser; import org.apache.commons.imaging.ImagingException; import org.apache.commons.imaging.bytesource.ByteSource; import org.apache.commons.imaging.common.ImageMetadata; diff --git a/src/main/java/org/apache/commons/imaging/formats/rgbe/RgbeImageParser.java b/src/main/java/org/apache/commons/imaging/formats/rgbe/RgbeImageParser.java index 80c059e8..517b124a 100644 --- a/src/main/java/org/apache/commons/imaging/formats/rgbe/RgbeImageParser.java +++ b/src/main/java/org/apache/commons/imaging/formats/rgbe/RgbeImageParser.java @@ -29,10 +29,10 @@ import java.awt.image.Raster; import java.io.IOException; import java.util.ArrayList; +import org.apache.commons.imaging.AbstractImageParser; import org.apache.commons.imaging.ImageFormat; import org.apache.commons.imaging.ImageFormats; import org.apache.commons.imaging.ImageInfo; -import org.apache.commons.imaging.AbstractImageParser; import org.apache.commons.imaging.ImagingException; import org.apache.commons.imaging.bytesource.ByteSource; import org.apache.commons.imaging.common.ImageMetadata; diff --git a/src/main/java/org/apache/commons/imaging/formats/tiff/TiffImageParser.java b/src/main/java/org/apache/commons/imaging/formats/tiff/TiffImageParser.java index 4bd56aa9..5dd24bbf 100644 --- a/src/main/java/org/apache/commons/imaging/formats/tiff/TiffImageParser.java +++ b/src/main/java/org/apache/commons/imaging/formats/tiff/TiffImageParser.java @@ -19,7 +19,10 @@ package org.apache.commons.imaging.formats.tiff; import static org.apache.commons.imaging.formats.tiff.constants.TiffConstants.TIFF_COMPRESSION_CCITT_1D; import static org.apache.commons.imaging.formats.tiff.constants.TiffConstants.TIFF_COMPRESSION_CCITT_GROUP_3; import static org.apache.commons.imaging.formats.tiff.constants.TiffConstants.TIFF_COMPRESSION_CCITT_GROUP_4; +import static org.apache.commons.imaging.formats.tiff.constants.TiffConstants.TIFF_COMPRESSION_DEFLATE_ADOBE; +import static org.apache.commons.imaging.formats.tiff.constants.TiffConstants.TIFF_COMPRESSION_DEFLATE_PKZIP; import static org.apache.commons.imaging.formats.tiff.constants.TiffConstants.TIFF_COMPRESSION_JPEG; +import static org.apache.commons.imaging.formats.tiff.constants.TiffConstants.TIFF_COMPRESSION_JPEG_OBSOLETE; import static org.apache.commons.imaging.formats.tiff.constants.TiffConstants.TIFF_COMPRESSION_LZW; import static org.apache.commons.imaging.formats.tiff.constants.TiffConstants.TIFF_COMPRESSION_PACKBITS; import static org.apache.commons.imaging.formats.tiff.constants.TiffConstants.TIFF_COMPRESSION_UNCOMPRESSED_1; @@ -36,11 +39,11 @@ import java.nio.charset.StandardCharsets; import java.util.ArrayList; import java.util.List; +import org.apache.commons.imaging.AbstractImageParser; import org.apache.commons.imaging.FormatCompliance; import org.apache.commons.imaging.ImageFormat; import org.apache.commons.imaging.ImageFormats; import org.apache.commons.imaging.ImageInfo; -import org.apache.commons.imaging.AbstractImageParser; import org.apache.commons.imaging.ImagingException; import org.apache.commons.imaging.bytesource.ByteSource; import org.apache.commons.imaging.common.Allocator; @@ -49,9 +52,6 @@ import org.apache.commons.imaging.common.ImageMetadata; import org.apache.commons.imaging.common.XmpEmbeddable; import org.apache.commons.imaging.common.XmpImagingParameters; import org.apache.commons.imaging.formats.tiff.TiffDirectory.ImageDataElement; -import static org.apache.commons.imaging.formats.tiff.constants.TiffConstants.TIFF_COMPRESSION_DEFLATE_ADOBE; -import static org.apache.commons.imaging.formats.tiff.constants.TiffConstants.TIFF_COMPRESSION_DEFLATE_PKZIP; -import static org.apache.commons.imaging.formats.tiff.constants.TiffConstants.TIFF_COMPRESSION_JPEG_OBSOLETE; import org.apache.commons.imaging.formats.tiff.constants.TiffEpTagConstants; import org.apache.commons.imaging.formats.tiff.constants.TiffPlanarConfiguration; import org.apache.commons.imaging.formats.tiff.constants.TiffTagConstants; 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 66470279..0bfae8f4 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 @@ -32,6 +32,7 @@ import java.io.InputStream; import java.nio.ByteOrder; import java.util.ArrayList; import java.util.List; + import org.apache.commons.imaging.FormatCompliance; import org.apache.commons.imaging.ImagingException; import org.apache.commons.imaging.bytesource.ByteSource; diff --git a/src/main/java/org/apache/commons/imaging/formats/tiff/datareaders/DataReaderStrips.java b/src/main/java/org/apache/commons/imaging/formats/tiff/datareaders/DataReaderStrips.java index c37f0cc0..e1598635 100644 --- a/src/main/java/org/apache/commons/imaging/formats/tiff/datareaders/DataReaderStrips.java +++ b/src/main/java/org/apache/commons/imaging/formats/tiff/datareaders/DataReaderStrips.java @@ -24,8 +24,8 @@ import java.nio.ByteOrder; import org.apache.commons.imaging.ImagingException; import org.apache.commons.imaging.common.Allocator; import org.apache.commons.imaging.common.ImageBuilder; -import org.apache.commons.imaging.formats.tiff.TiffDirectory; import org.apache.commons.imaging.formats.tiff.AbstractTiffImageData; +import org.apache.commons.imaging.formats.tiff.TiffDirectory; import org.apache.commons.imaging.formats.tiff.TiffRasterData; import org.apache.commons.imaging.formats.tiff.TiffRasterDataFloat; import org.apache.commons.imaging.formats.tiff.TiffRasterDataInt; diff --git a/src/main/java/org/apache/commons/imaging/formats/tiff/datareaders/DataReaderTiled.java b/src/main/java/org/apache/commons/imaging/formats/tiff/datareaders/DataReaderTiled.java index 755be5a9..07be845a 100644 --- a/src/main/java/org/apache/commons/imaging/formats/tiff/datareaders/DataReaderTiled.java +++ b/src/main/java/org/apache/commons/imaging/formats/tiff/datareaders/DataReaderTiled.java @@ -30,8 +30,8 @@ import java.nio.ByteOrder; import org.apache.commons.imaging.ImagingException; import org.apache.commons.imaging.common.Allocator; import org.apache.commons.imaging.common.ImageBuilder; -import org.apache.commons.imaging.formats.tiff.TiffDirectory; import org.apache.commons.imaging.formats.tiff.AbstractTiffImageData; +import org.apache.commons.imaging.formats.tiff.TiffDirectory; import org.apache.commons.imaging.formats.tiff.TiffRasterData; import org.apache.commons.imaging.formats.tiff.TiffRasterDataFloat; import org.apache.commons.imaging.formats.tiff.TiffRasterDataInt; diff --git a/src/main/java/org/apache/commons/imaging/formats/tiff/write/TiffImageWriterLossless.java b/src/main/java/org/apache/commons/imaging/formats/tiff/write/TiffImageWriterLossless.java index f7b48e3f..42c08cdd 100644 --- a/src/main/java/org/apache/commons/imaging/formats/tiff/write/TiffImageWriterLossless.java +++ b/src/main/java/org/apache/commons/imaging/formats/tiff/write/TiffImageWriterLossless.java @@ -34,13 +34,13 @@ import org.apache.commons.imaging.ImagingException; import org.apache.commons.imaging.bytesource.ByteSource; import org.apache.commons.imaging.common.Allocator; import org.apache.commons.imaging.common.BinaryOutputStream; +import org.apache.commons.imaging.formats.tiff.AbstractTiffElement; +import org.apache.commons.imaging.formats.tiff.AbstractTiffElement.DataElement; +import org.apache.commons.imaging.formats.tiff.AbstractTiffImageData; import org.apache.commons.imaging.formats.tiff.JpegImageData; import org.apache.commons.imaging.formats.tiff.TiffContents; import org.apache.commons.imaging.formats.tiff.TiffDirectory; -import org.apache.commons.imaging.formats.tiff.AbstractTiffElement; -import org.apache.commons.imaging.formats.tiff.AbstractTiffElement.DataElement; import org.apache.commons.imaging.formats.tiff.TiffField; -import org.apache.commons.imaging.formats.tiff.AbstractTiffImageData; import org.apache.commons.imaging.formats.tiff.TiffImagingParameters; import org.apache.commons.imaging.formats.tiff.TiffReader; import org.apache.commons.imaging.formats.tiff.constants.ExifTagConstants; 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 6ce23373..287b1d20 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 @@ -34,10 +34,10 @@ import org.apache.commons.imaging.ImagingException; import org.apache.commons.imaging.common.Allocator; import org.apache.commons.imaging.common.BinaryOutputStream; import org.apache.commons.imaging.common.RationalNumber; -import org.apache.commons.imaging.formats.tiff.JpegImageData; -import org.apache.commons.imaging.formats.tiff.TiffDirectory; import org.apache.commons.imaging.formats.tiff.AbstractTiffElement; import org.apache.commons.imaging.formats.tiff.AbstractTiffImageData; +import org.apache.commons.imaging.formats.tiff.JpegImageData; +import org.apache.commons.imaging.formats.tiff.TiffDirectory; import org.apache.commons.imaging.formats.tiff.constants.TiffDirectoryType; import org.apache.commons.imaging.formats.tiff.constants.TiffTagConstants; import org.apache.commons.imaging.formats.tiff.fieldtypes.AbstractFieldType; diff --git a/src/main/java/org/apache/commons/imaging/formats/wbmp/WbmpImageParser.java b/src/main/java/org/apache/commons/imaging/formats/wbmp/WbmpImageParser.java index c9e8b212..507d1fcc 100644 --- a/src/main/java/org/apache/commons/imaging/formats/wbmp/WbmpImageParser.java +++ b/src/main/java/org/apache/commons/imaging/formats/wbmp/WbmpImageParser.java @@ -31,10 +31,10 @@ import java.io.PrintWriter; import java.util.ArrayList; import java.util.Properties; +import org.apache.commons.imaging.AbstractImageParser; import org.apache.commons.imaging.ImageFormat; import org.apache.commons.imaging.ImageFormats; import org.apache.commons.imaging.ImageInfo; -import org.apache.commons.imaging.AbstractImageParser; import org.apache.commons.imaging.ImagingException; import org.apache.commons.imaging.bytesource.ByteSource; import org.apache.commons.imaging.common.ImageMetadata; diff --git a/src/main/java/org/apache/commons/imaging/formats/webp/WebPChunkType.java b/src/main/java/org/apache/commons/imaging/formats/webp/WebPChunkType.java index fb184321..929269d6 100644 --- a/src/main/java/org/apache/commons/imaging/formats/webp/WebPChunkType.java +++ b/src/main/java/org/apache/commons/imaging/formats/webp/WebPChunkType.java @@ -16,6 +16,8 @@ */ package org.apache.commons.imaging.formats.webp; +import java.io.IOException; + import org.apache.commons.imaging.ImagingException; import org.apache.commons.imaging.common.BinaryFunctions; import org.apache.commons.imaging.formats.webp.chunks.WebPChunk; @@ -30,8 +32,6 @@ import org.apache.commons.imaging.formats.webp.chunks.WebPChunkVp8x; import org.apache.commons.imaging.formats.webp.chunks.WebPChunkXml; import org.apache.commons.imaging.formats.webp.chunks.WebPChunkXyzw; -import java.io.IOException; - /** * WebP chunk type. * diff --git a/src/main/java/org/apache/commons/imaging/formats/webp/WebPImageMetadata.java b/src/main/java/org/apache/commons/imaging/formats/webp/WebPImageMetadata.java index 8793a638..b6f6a698 100644 --- a/src/main/java/org/apache/commons/imaging/formats/webp/WebPImageMetadata.java +++ b/src/main/java/org/apache/commons/imaging/formats/webp/WebPImageMetadata.java @@ -16,13 +16,13 @@ */ package org.apache.commons.imaging.formats.webp; -import org.apache.commons.imaging.common.GenericImageMetadata; -import org.apache.commons.imaging.formats.tiff.TiffImageMetadata; - import java.util.ArrayList; import java.util.Collections; import java.util.List; +import org.apache.commons.imaging.common.GenericImageMetadata; +import org.apache.commons.imaging.formats.tiff.TiffImageMetadata; + /** * WebP image metadata. * diff --git a/src/main/java/org/apache/commons/imaging/formats/webp/WebPImageParser.java b/src/main/java/org/apache/commons/imaging/formats/webp/WebPImageParser.java index ed038447..ca6532bc 100644 --- a/src/main/java/org/apache/commons/imaging/formats/webp/WebPImageParser.java +++ b/src/main/java/org/apache/commons/imaging/formats/webp/WebPImageParser.java @@ -16,6 +16,19 @@ */ package org.apache.commons.imaging.formats.webp; +import static org.apache.commons.imaging.common.BinaryFunctions.read4Bytes; +import static org.apache.commons.imaging.common.BinaryFunctions.readBytes; +import static org.apache.commons.imaging.common.BinaryFunctions.skipBytes; + +import java.awt.Dimension; +import java.awt.image.BufferedImage; +import java.io.Closeable; +import java.io.IOException; +import java.io.InputStream; +import java.io.PrintWriter; +import java.nio.ByteOrder; +import java.util.ArrayList; + import org.apache.commons.imaging.AbstractImageParser; import org.apache.commons.imaging.ImageFormat; import org.apache.commons.imaging.ImageFormats; @@ -33,19 +46,6 @@ import org.apache.commons.imaging.formats.webp.chunks.WebPChunkVp8x; import org.apache.commons.imaging.formats.webp.chunks.WebPChunkXml; import org.apache.commons.imaging.internal.SafeOperations; -import java.awt.Dimension; -import java.awt.image.BufferedImage; -import java.io.Closeable; -import java.io.IOException; -import java.io.InputStream; -import java.io.PrintWriter; -import java.nio.ByteOrder; -import java.util.ArrayList; - -import static org.apache.commons.imaging.common.BinaryFunctions.read4Bytes; -import static org.apache.commons.imaging.common.BinaryFunctions.readBytes; -import static org.apache.commons.imaging.common.BinaryFunctions.skipBytes; - /** * WebP image parser. * diff --git a/src/main/java/org/apache/commons/imaging/formats/webp/chunks/WebPChunk.java b/src/main/java/org/apache/commons/imaging/formats/webp/chunks/WebPChunk.java index cbf69d52..198d8fbe 100644 --- a/src/main/java/org/apache/commons/imaging/formats/webp/chunks/WebPChunk.java +++ b/src/main/java/org/apache/commons/imaging/formats/webp/chunks/WebPChunk.java @@ -16,15 +16,15 @@ */ package org.apache.commons.imaging.formats.webp.chunks; -import org.apache.commons.imaging.ImagingException; -import org.apache.commons.imaging.common.BinaryFileParser; -import org.apache.commons.imaging.internal.SafeOperations; - import java.io.IOException; import java.io.PrintWriter; import java.nio.ByteOrder; import java.nio.charset.StandardCharsets; +import org.apache.commons.imaging.ImagingException; +import org.apache.commons.imaging.common.BinaryFileParser; +import org.apache.commons.imaging.internal.SafeOperations; + /** * A WebP image is composed of several chunks. This is the base class for the chunks, * used by the parser. diff --git a/src/main/java/org/apache/commons/imaging/formats/webp/chunks/WebPChunkExif.java b/src/main/java/org/apache/commons/imaging/formats/webp/chunks/WebPChunkExif.java index 96c4c374..61f17ff2 100644 --- a/src/main/java/org/apache/commons/imaging/formats/webp/chunks/WebPChunkExif.java +++ b/src/main/java/org/apache/commons/imaging/formats/webp/chunks/WebPChunkExif.java @@ -16,14 +16,14 @@ */ package org.apache.commons.imaging.formats.webp.chunks; +import java.io.IOException; +import java.io.PrintWriter; + import org.apache.commons.imaging.ImagingException; import org.apache.commons.imaging.common.ImageMetadata; import org.apache.commons.imaging.formats.tiff.TiffImageMetadata; import org.apache.commons.imaging.formats.tiff.TiffImageParser; -import java.io.IOException; -import java.io.PrintWriter; - /** * Exif (metadata) chunk. * diff --git a/src/main/java/org/apache/commons/imaging/formats/webp/chunks/WebPChunkVp8.java b/src/main/java/org/apache/commons/imaging/formats/webp/chunks/WebPChunkVp8.java index ded40fa8..fa026845 100644 --- a/src/main/java/org/apache/commons/imaging/formats/webp/chunks/WebPChunkVp8.java +++ b/src/main/java/org/apache/commons/imaging/formats/webp/chunks/WebPChunkVp8.java @@ -16,11 +16,11 @@ */ package org.apache.commons.imaging.formats.webp.chunks; -import org.apache.commons.imaging.ImagingException; - import java.io.IOException; import java.io.PrintWriter; +import org.apache.commons.imaging.ImagingException; + /** * VP8 (bitstream) chunk. * diff --git a/src/main/java/org/apache/commons/imaging/formats/webp/chunks/WebPChunkVp8l.java b/src/main/java/org/apache/commons/imaging/formats/webp/chunks/WebPChunkVp8l.java index 843f3977..7eb63e3a 100644 --- a/src/main/java/org/apache/commons/imaging/formats/webp/chunks/WebPChunkVp8l.java +++ b/src/main/java/org/apache/commons/imaging/formats/webp/chunks/WebPChunkVp8l.java @@ -16,12 +16,12 @@ */ package org.apache.commons.imaging.formats.webp.chunks; -import org.apache.commons.imaging.ImagingException; -import org.apache.commons.imaging.internal.SafeOperations; - import java.io.IOException; import java.io.PrintWriter; +import org.apache.commons.imaging.ImagingException; +import org.apache.commons.imaging.internal.SafeOperations; + /** * VP8L (lossless bitstream) chunk. * diff --git a/src/main/java/org/apache/commons/imaging/formats/webp/chunks/WebPChunkVp8x.java b/src/main/java/org/apache/commons/imaging/formats/webp/chunks/WebPChunkVp8x.java index 24aa477e..6b601b43 100644 --- a/src/main/java/org/apache/commons/imaging/formats/webp/chunks/WebPChunkVp8x.java +++ b/src/main/java/org/apache/commons/imaging/formats/webp/chunks/WebPChunkVp8x.java @@ -16,11 +16,11 @@ */ package org.apache.commons.imaging.formats.webp.chunks; -import org.apache.commons.imaging.ImagingException; - import java.io.IOException; import java.io.PrintWriter; +import org.apache.commons.imaging.ImagingException; + /** * VP8X (descriptions of features used) chunk. * diff --git a/src/main/java/org/apache/commons/imaging/formats/webp/chunks/WebPChunkXml.java b/src/main/java/org/apache/commons/imaging/formats/webp/chunks/WebPChunkXml.java index 7b619ef6..07fcf79a 100644 --- a/src/main/java/org/apache/commons/imaging/formats/webp/chunks/WebPChunkXml.java +++ b/src/main/java/org/apache/commons/imaging/formats/webp/chunks/WebPChunkXml.java @@ -16,10 +16,10 @@ */ package org.apache.commons.imaging.formats.webp.chunks; -import org.apache.commons.imaging.ImagingException; - import java.nio.charset.StandardCharsets; +import org.apache.commons.imaging.ImagingException; + /** * XML chunk. * 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 414220cd..620cca92 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 @@ -36,10 +36,10 @@ import java.util.Map.Entry; import java.util.Properties; import java.util.UUID; +import org.apache.commons.imaging.AbstractImageParser; import org.apache.commons.imaging.ImageFormat; import org.apache.commons.imaging.ImageFormats; import org.apache.commons.imaging.ImageInfo; -import org.apache.commons.imaging.AbstractImageParser; import org.apache.commons.imaging.ImagingException; import org.apache.commons.imaging.bytesource.ByteSource; import org.apache.commons.imaging.common.Allocator; 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 5ed28c1a..c5257007 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 @@ -39,10 +39,10 @@ import java.util.Map.Entry; import java.util.Properties; import java.util.UUID; +import org.apache.commons.imaging.AbstractImageParser; import org.apache.commons.imaging.ImageFormat; import org.apache.commons.imaging.ImageFormats; import org.apache.commons.imaging.ImageInfo; -import org.apache.commons.imaging.AbstractImageParser; import org.apache.commons.imaging.ImagingException; import org.apache.commons.imaging.bytesource.ByteSource; import org.apache.commons.imaging.common.Allocator; diff --git a/src/main/java/org/apache/commons/imaging/internal/ImageParserFactory.java b/src/main/java/org/apache/commons/imaging/internal/ImageParserFactory.java index 0d0c6bb8..a9857bcc 100644 --- a/src/main/java/org/apache/commons/imaging/internal/ImageParserFactory.java +++ b/src/main/java/org/apache/commons/imaging/internal/ImageParserFactory.java @@ -20,9 +20,9 @@ import java.io.IOException; import java.util.function.Predicate; import java.util.function.Supplier; +import org.apache.commons.imaging.AbstractImageParser; import org.apache.commons.imaging.ImageFormat; import org.apache.commons.imaging.ImageFormats; -import org.apache.commons.imaging.AbstractImageParser; import org.apache.commons.imaging.Imaging; import org.apache.commons.imaging.ImagingParameters; import org.apache.commons.imaging.bytesource.ByteSource; diff --git a/src/test/java/org/apache/commons/imaging/bytesource/AbstractByteSourceTest.java b/src/test/java/org/apache/commons/imaging/bytesource/AbstractByteSourceTest.java index 1dd9eb38..dc115a93 100644 --- a/src/test/java/org/apache/commons/imaging/bytesource/AbstractByteSourceTest.java +++ b/src/test/java/org/apache/commons/imaging/bytesource/AbstractByteSourceTest.java @@ -27,8 +27,8 @@ import java.io.IOException; import java.io.OutputStream; import java.nio.file.Files; -import org.apache.commons.imaging.ImagingConstants; import org.apache.commons.imaging.AbstractImagingTest; +import org.apache.commons.imaging.ImagingConstants; import org.junit.jupiter.api.Test; public abstract class AbstractByteSourceTest extends AbstractImagingTest { diff --git a/src/test/java/org/apache/commons/imaging/bytesource/ByteSourceImageTest.java b/src/test/java/org/apache/commons/imaging/bytesource/ByteSourceImageTest.java index 5cb2dd87..7ce693cb 100644 --- a/src/test/java/org/apache/commons/imaging/bytesource/ByteSourceImageTest.java +++ b/src/test/java/org/apache/commons/imaging/bytesource/ByteSourceImageTest.java @@ -33,10 +33,10 @@ import java.lang.reflect.Method; import java.lang.reflect.Modifier; import java.util.stream.Stream; +import org.apache.commons.imaging.AbstractImageParser; import org.apache.commons.imaging.ImageFormat; import org.apache.commons.imaging.ImageFormats; import org.apache.commons.imaging.ImageInfo; -import org.apache.commons.imaging.AbstractImageParser; import org.apache.commons.imaging.Imaging; import org.apache.commons.imaging.ImagingException; import org.apache.commons.imaging.ImagingParameters; diff --git a/src/test/java/org/apache/commons/imaging/formats/bmp/AbstractBmpTest.java b/src/test/java/org/apache/commons/imaging/formats/bmp/AbstractBmpTest.java index 21be4948..6e7fea3c 100644 --- a/src/test/java/org/apache/commons/imaging/formats/bmp/AbstractBmpTest.java +++ b/src/test/java/org/apache/commons/imaging/formats/bmp/AbstractBmpTest.java @@ -20,11 +20,11 @@ import java.io.File; import java.io.IOException; import java.util.List; +import org.apache.commons.imaging.AbstractImagingTest; import org.apache.commons.imaging.ImageFormat; import org.apache.commons.imaging.ImageFormats; import org.apache.commons.imaging.Imaging; import org.apache.commons.imaging.ImagingException; -import org.apache.commons.imaging.AbstractImagingTest; public abstract class AbstractBmpTest extends AbstractImagingTest { diff --git a/src/test/java/org/apache/commons/imaging/formats/dcx/AbstractDcxTest.java b/src/test/java/org/apache/commons/imaging/formats/dcx/AbstractDcxTest.java index b59f891e..0843fc21 100644 --- a/src/test/java/org/apache/commons/imaging/formats/dcx/AbstractDcxTest.java +++ b/src/test/java/org/apache/commons/imaging/formats/dcx/AbstractDcxTest.java @@ -21,11 +21,11 @@ import java.io.File; import java.io.IOException; import java.util.List; +import org.apache.commons.imaging.AbstractImagingTest; import org.apache.commons.imaging.ImageFormat; import org.apache.commons.imaging.ImageFormats; import org.apache.commons.imaging.Imaging; import org.apache.commons.imaging.ImagingException; -import org.apache.commons.imaging.AbstractImagingTest; public abstract class AbstractDcxTest extends AbstractImagingTest { diff --git a/src/test/java/org/apache/commons/imaging/formats/gif/AbstractGifTest.java b/src/test/java/org/apache/commons/imaging/formats/gif/AbstractGifTest.java index bf265b45..2f9d97a7 100644 --- a/src/test/java/org/apache/commons/imaging/formats/gif/AbstractGifTest.java +++ b/src/test/java/org/apache/commons/imaging/formats/gif/AbstractGifTest.java @@ -21,11 +21,11 @@ import java.io.File; import java.io.IOException; import java.util.List; +import org.apache.commons.imaging.AbstractImagingTest; import org.apache.commons.imaging.ImageFormat; import org.apache.commons.imaging.ImageFormats; import org.apache.commons.imaging.Imaging; import org.apache.commons.imaging.ImagingException; -import org.apache.commons.imaging.AbstractImagingTest; public abstract class AbstractGifTest extends AbstractImagingTest { diff --git a/src/test/java/org/apache/commons/imaging/formats/icns/IcnsBaseTest.java b/src/test/java/org/apache/commons/imaging/formats/icns/IcnsBaseTest.java index 9536fb63..642b677f 100644 --- a/src/test/java/org/apache/commons/imaging/formats/icns/IcnsBaseTest.java +++ b/src/test/java/org/apache/commons/imaging/formats/icns/IcnsBaseTest.java @@ -21,11 +21,11 @@ import java.io.File; import java.io.IOException; import java.util.List; +import org.apache.commons.imaging.AbstractImagingTest; import org.apache.commons.imaging.ImageFormat; import org.apache.commons.imaging.ImageFormats; import org.apache.commons.imaging.Imaging; import org.apache.commons.imaging.ImagingException; -import org.apache.commons.imaging.AbstractImagingTest; public abstract class IcnsBaseTest extends AbstractImagingTest { diff --git a/src/test/java/org/apache/commons/imaging/formats/ico/AbstractIcoTest.java b/src/test/java/org/apache/commons/imaging/formats/ico/AbstractIcoTest.java index 836bb3f5..c14d8234 100644 --- a/src/test/java/org/apache/commons/imaging/formats/ico/AbstractIcoTest.java +++ b/src/test/java/org/apache/commons/imaging/formats/ico/AbstractIcoTest.java @@ -21,8 +21,8 @@ import java.io.File; import java.io.IOException; import java.util.List; -import org.apache.commons.imaging.ImagingException; import org.apache.commons.imaging.AbstractImagingTest; +import org.apache.commons.imaging.ImagingException; public abstract class AbstractIcoTest extends AbstractImagingTest { diff --git a/src/test/java/org/apache/commons/imaging/formats/jpeg/JpegBaseTest.java b/src/test/java/org/apache/commons/imaging/formats/jpeg/JpegBaseTest.java index 9c90f569..24f6a029 100644 --- a/src/test/java/org/apache/commons/imaging/formats/jpeg/JpegBaseTest.java +++ b/src/test/java/org/apache/commons/imaging/formats/jpeg/JpegBaseTest.java @@ -21,11 +21,11 @@ import java.io.File; import java.io.IOException; import java.util.List; +import org.apache.commons.imaging.AbstractImagingTest; import org.apache.commons.imaging.ImageFormat; import org.apache.commons.imaging.ImageFormats; import org.apache.commons.imaging.Imaging; import org.apache.commons.imaging.ImagingException; -import org.apache.commons.imaging.AbstractImagingTest; public abstract class JpegBaseTest extends AbstractImagingTest { diff --git a/src/test/java/org/apache/commons/imaging/formats/jpeg/JpegWithJpegThumbnailTest.java b/src/test/java/org/apache/commons/imaging/formats/jpeg/JpegWithJpegThumbnailTest.java index f337d1a2..85cc58c5 100644 --- a/src/test/java/org/apache/commons/imaging/formats/jpeg/JpegWithJpegThumbnailTest.java +++ b/src/test/java/org/apache/commons/imaging/formats/jpeg/JpegWithJpegThumbnailTest.java @@ -22,8 +22,8 @@ import static org.junit.jupiter.api.Assertions.assertNotNull; import java.awt.image.BufferedImage; import java.io.File; -import org.apache.commons.imaging.Imaging; import org.apache.commons.imaging.AbstractImagingTest; +import org.apache.commons.imaging.Imaging; import org.apache.commons.imaging.common.ImageMetadata; import org.junit.jupiter.api.Test; diff --git a/src/test/java/org/apache/commons/imaging/formats/jpeg/exif/AbstractExifTest.java b/src/test/java/org/apache/commons/imaging/formats/jpeg/exif/AbstractExifTest.java index 3fbbfca1..dfb81965 100644 --- a/src/test/java/org/apache/commons/imaging/formats/jpeg/exif/AbstractExifTest.java +++ b/src/test/java/org/apache/commons/imaging/formats/jpeg/exif/AbstractExifTest.java @@ -21,8 +21,8 @@ import java.io.File; import java.io.IOException; import java.util.List; -import org.apache.commons.imaging.ImagingException; import org.apache.commons.imaging.AbstractImagingTest; +import org.apache.commons.imaging.ImagingException; import org.apache.commons.imaging.bytesource.ByteSource; import org.apache.commons.imaging.formats.jpeg.JpegImageParser; diff --git a/src/test/java/org/apache/commons/imaging/formats/jpeg/iptc/IptcBaseTest.java b/src/test/java/org/apache/commons/imaging/formats/jpeg/iptc/IptcBaseTest.java index e55eb9ae..e7bbaab8 100644 --- a/src/test/java/org/apache/commons/imaging/formats/jpeg/iptc/IptcBaseTest.java +++ b/src/test/java/org/apache/commons/imaging/formats/jpeg/iptc/IptcBaseTest.java @@ -21,8 +21,8 @@ import java.io.File; import java.io.IOException; import java.util.List; -import org.apache.commons.imaging.ImagingException; import org.apache.commons.imaging.AbstractImagingTest; +import org.apache.commons.imaging.ImagingException; import org.apache.commons.imaging.bytesource.ByteSource; import org.apache.commons.imaging.formats.jpeg.JpegImageParser; diff --git a/src/test/java/org/apache/commons/imaging/formats/jpeg/xmp/AbstractJpegXmpTest.java b/src/test/java/org/apache/commons/imaging/formats/jpeg/xmp/AbstractJpegXmpTest.java index eeb7eab8..fbf81513 100644 --- a/src/test/java/org/apache/commons/imaging/formats/jpeg/xmp/AbstractJpegXmpTest.java +++ b/src/test/java/org/apache/commons/imaging/formats/jpeg/xmp/AbstractJpegXmpTest.java @@ -21,8 +21,8 @@ import java.io.File; import java.io.IOException; import java.util.List; -import org.apache.commons.imaging.ImagingException; import org.apache.commons.imaging.AbstractImagingTest; +import org.apache.commons.imaging.ImagingException; import org.apache.commons.imaging.bytesource.ByteSource; import org.apache.commons.imaging.formats.jpeg.JpegImageParser; diff --git a/src/test/java/org/apache/commons/imaging/formats/pam/AbstractPamTest.java b/src/test/java/org/apache/commons/imaging/formats/pam/AbstractPamTest.java index 8ea155bd..ffaaba68 100644 --- a/src/test/java/org/apache/commons/imaging/formats/pam/AbstractPamTest.java +++ b/src/test/java/org/apache/commons/imaging/formats/pam/AbstractPamTest.java @@ -21,11 +21,11 @@ import java.io.File; import java.io.IOException; import java.util.List; +import org.apache.commons.imaging.AbstractImagingTest; import org.apache.commons.imaging.ImageFormat; import org.apache.commons.imaging.ImageFormats; import org.apache.commons.imaging.Imaging; import org.apache.commons.imaging.ImagingException; -import org.apache.commons.imaging.AbstractImagingTest; public abstract class AbstractPamTest extends AbstractImagingTest { diff --git a/src/test/java/org/apache/commons/imaging/formats/pcx/AbstractPcxTest.java b/src/test/java/org/apache/commons/imaging/formats/pcx/AbstractPcxTest.java index b34ca40f..7cb75775 100644 --- a/src/test/java/org/apache/commons/imaging/formats/pcx/AbstractPcxTest.java +++ b/src/test/java/org/apache/commons/imaging/formats/pcx/AbstractPcxTest.java @@ -21,8 +21,8 @@ import java.io.File; import java.io.IOException; import java.util.List; -import org.apache.commons.imaging.ImagingException; import org.apache.commons.imaging.AbstractImagingTest; +import org.apache.commons.imaging.ImagingException; public abstract class AbstractPcxTest extends AbstractImagingTest { diff --git a/src/test/java/org/apache/commons/imaging/formats/png/AbstractPngTest.java b/src/test/java/org/apache/commons/imaging/formats/png/AbstractPngTest.java index 1b71695a..9a3173ba 100644 --- a/src/test/java/org/apache/commons/imaging/formats/png/AbstractPngTest.java +++ b/src/test/java/org/apache/commons/imaging/formats/png/AbstractPngTest.java @@ -21,11 +21,11 @@ import java.io.File; import java.io.IOException; import java.util.List; +import org.apache.commons.imaging.AbstractImagingTest; import org.apache.commons.imaging.ImageFormat; import org.apache.commons.imaging.ImageFormats; import org.apache.commons.imaging.Imaging; import org.apache.commons.imaging.ImagingException; -import org.apache.commons.imaging.AbstractImagingTest; public abstract class AbstractPngTest extends AbstractImagingTest { diff --git a/src/test/java/org/apache/commons/imaging/formats/png/PngWriteReadTest.java b/src/test/java/org/apache/commons/imaging/formats/png/PngWriteReadTest.java index 11259651..eb5965a6 100644 --- a/src/test/java/org/apache/commons/imaging/formats/png/PngWriteReadTest.java +++ b/src/test/java/org/apache/commons/imaging/formats/png/PngWriteReadTest.java @@ -29,10 +29,10 @@ import java.util.LinkedList; import java.util.List; import java.util.Random; +import org.apache.commons.imaging.AbstractImagingTest; import org.apache.commons.imaging.ImageFormats; import org.apache.commons.imaging.Imaging; import org.apache.commons.imaging.ImagingException; -import org.apache.commons.imaging.AbstractImagingTest; import org.apache.commons.imaging.common.GenericImageMetadata; import org.apache.commons.imaging.common.ImageMetadata; import org.junit.jupiter.api.Test; diff --git a/src/test/java/org/apache/commons/imaging/formats/psd/AbstractPsdTest.java b/src/test/java/org/apache/commons/imaging/formats/psd/AbstractPsdTest.java index 8d47e700..77302689 100644 --- a/src/test/java/org/apache/commons/imaging/formats/psd/AbstractPsdTest.java +++ b/src/test/java/org/apache/commons/imaging/formats/psd/AbstractPsdTest.java @@ -20,11 +20,11 @@ import java.io.File; import java.io.IOException; import java.util.List; +import org.apache.commons.imaging.AbstractImagingTest; import org.apache.commons.imaging.ImageFormat; import org.apache.commons.imaging.ImageFormats; import org.apache.commons.imaging.Imaging; import org.apache.commons.imaging.ImagingException; -import org.apache.commons.imaging.AbstractImagingTest; public abstract class AbstractPsdTest extends AbstractImagingTest { private static final ImageFilter IMAGE_FILTER = AbstractPsdTest::isPsd; diff --git a/src/test/java/org/apache/commons/imaging/formats/rgbe/RgbeBaseTest.java b/src/test/java/org/apache/commons/imaging/formats/rgbe/RgbeBaseTest.java index 330aa2af..a585c1a1 100644 --- a/src/test/java/org/apache/commons/imaging/formats/rgbe/RgbeBaseTest.java +++ b/src/test/java/org/apache/commons/imaging/formats/rgbe/RgbeBaseTest.java @@ -20,11 +20,11 @@ import java.io.File; import java.io.IOException; import java.util.List; +import org.apache.commons.imaging.AbstractImagingTest; import org.apache.commons.imaging.ImageFormat; import org.apache.commons.imaging.ImageFormats; import org.apache.commons.imaging.Imaging; import org.apache.commons.imaging.ImagingException; -import org.apache.commons.imaging.AbstractImagingTest; public abstract class RgbeBaseTest extends AbstractImagingTest { diff --git a/src/test/java/org/apache/commons/imaging/formats/tiff/TiffBaseTest.java b/src/test/java/org/apache/commons/imaging/formats/tiff/TiffBaseTest.java index 314c46c4..d82fcc55 100644 --- a/src/test/java/org/apache/commons/imaging/formats/tiff/TiffBaseTest.java +++ b/src/test/java/org/apache/commons/imaging/formats/tiff/TiffBaseTest.java @@ -21,11 +21,11 @@ import java.io.File; import java.io.IOException; import java.util.List; +import org.apache.commons.imaging.AbstractImagingTest; import org.apache.commons.imaging.ImageFormat; import org.apache.commons.imaging.ImageFormats; import org.apache.commons.imaging.Imaging; import org.apache.commons.imaging.ImagingException; -import org.apache.commons.imaging.AbstractImagingTest; public abstract class TiffBaseTest extends AbstractImagingTest { diff --git a/src/test/java/org/apache/commons/imaging/formats/tiff/TiffBigTiffTest.java b/src/test/java/org/apache/commons/imaging/formats/tiff/TiffBigTiffTest.java index 6186c403..ecf29857 100644 --- a/src/test/java/org/apache/commons/imaging/formats/tiff/TiffBigTiffTest.java +++ b/src/test/java/org/apache/commons/imaging/formats/tiff/TiffBigTiffTest.java @@ -17,14 +17,14 @@ package org.apache.commons.imaging.formats.tiff; import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertTrue; import java.awt.image.BufferedImage; import java.io.File; import java.io.IOException; -import org.apache.commons.imaging.ImagingTestConstants; import org.apache.commons.imaging.Imaging; -import static org.junit.jupiter.api.Assertions.assertTrue; +import org.apache.commons.imaging.ImagingTestConstants; import org.junit.jupiter.api.Test; /** 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 c7cda51c..7582595d 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 @@ -19,7 +19,6 @@ package org.apache.commons.imaging.formats.tiff; import static org.junit.jupiter.api.Assertions.assertArrayEquals; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertThrows; -import static org.junit.jupiter.api.Assertions.assertTrue; import static org.junit.jupiter.api.Assertions.fail; import org.junit.jupiter.api.Test; diff --git a/src/test/java/org/apache/commons/imaging/formats/wbmp/WbmpBaseTest.java b/src/test/java/org/apache/commons/imaging/formats/wbmp/WbmpBaseTest.java index 6c38211f..ce57d273 100644 --- a/src/test/java/org/apache/commons/imaging/formats/wbmp/WbmpBaseTest.java +++ b/src/test/java/org/apache/commons/imaging/formats/wbmp/WbmpBaseTest.java @@ -18,8 +18,8 @@ import java.io.File; import java.io.IOException; import java.util.List; -import org.apache.commons.imaging.ImagingException; import org.apache.commons.imaging.AbstractImagingTest; +import org.apache.commons.imaging.ImagingException; public abstract class WbmpBaseTest extends AbstractImagingTest { private static final ImageFilter IMAGE_FILTER = WbmpBaseTest::isWbmp; diff --git a/src/test/java/org/apache/commons/imaging/formats/webp/WebPBaseTest.java b/src/test/java/org/apache/commons/imaging/formats/webp/WebPBaseTest.java index 0179e38c..6dcc5423 100644 --- a/src/test/java/org/apache/commons/imaging/formats/webp/WebPBaseTest.java +++ b/src/test/java/org/apache/commons/imaging/formats/webp/WebPBaseTest.java @@ -17,17 +17,17 @@ package org.apache.commons.imaging.formats.webp; +import java.io.File; +import java.io.IOException; +import java.util.List; +import java.util.stream.Stream; + import org.apache.commons.imaging.AbstractImagingTest; import org.apache.commons.imaging.ImageFormat; import org.apache.commons.imaging.ImageFormats; import org.apache.commons.imaging.Imaging; import org.apache.commons.imaging.ImagingException; -import java.io.File; -import java.io.IOException; -import java.util.List; -import java.util.stream.Stream; - public abstract class WebPBaseTest extends AbstractImagingTest { private static boolean isWebP(final File file) throws IOException { diff --git a/src/test/java/org/apache/commons/imaging/formats/webp/WebPDumpTest.java b/src/test/java/org/apache/commons/imaging/formats/webp/WebPDumpTest.java index 382f016b..1563a326 100644 --- a/src/test/java/org/apache/commons/imaging/formats/webp/WebPDumpTest.java +++ b/src/test/java/org/apache/commons/imaging/formats/webp/WebPDumpTest.java @@ -16,18 +16,18 @@ */ package org.apache.commons.imaging.formats.webp; -import org.apache.commons.imaging.Imaging; -import org.apache.commons.imaging.bytesource.ByteSource; -import org.apache.commons.imaging.internal.Debug; -import org.junit.jupiter.params.ParameterizedTest; -import org.junit.jupiter.params.provider.MethodSource; +import static org.junit.jupiter.api.Assertions.assertTrue; import java.awt.Dimension; import java.io.File; import java.io.PrintWriter; import java.io.StringWriter; -import static org.junit.jupiter.api.Assertions.assertTrue; +import org.apache.commons.imaging.Imaging; +import org.apache.commons.imaging.bytesource.ByteSource; +import org.apache.commons.imaging.internal.Debug; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.MethodSource; /** * Test the methods that dump data into streams. diff --git a/src/test/java/org/apache/commons/imaging/formats/webp/WebPMetadataTest.java b/src/test/java/org/apache/commons/imaging/formats/webp/WebPMetadataTest.java index cf98e37d..1b281046 100644 --- a/src/test/java/org/apache/commons/imaging/formats/webp/WebPMetadataTest.java +++ b/src/test/java/org/apache/commons/imaging/formats/webp/WebPMetadataTest.java @@ -16,6 +16,12 @@ */ package org.apache.commons.imaging.formats.webp; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertTrue; + +import java.io.File; + import org.apache.commons.imaging.ImageInfo; import org.apache.commons.imaging.bytesource.ByteSource; import org.apache.commons.imaging.formats.tiff.TiffImageMetadata; @@ -23,12 +29,6 @@ import org.apache.commons.imaging.formats.tiff.taginfos.TagInfo; import org.apache.commons.imaging.formats.tiff.taginfos.TagInfoAscii; import org.junit.jupiter.api.Test; -import java.io.File; - -import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertNotNull; -import static org.junit.jupiter.api.Assertions.assertTrue; - /** * Tests for the WebP metadata. */ diff --git a/src/test/java/org/apache/commons/imaging/formats/webp/WebPReadTest.java b/src/test/java/org/apache/commons/imaging/formats/webp/WebPReadTest.java index d766319e..f680f345 100644 --- a/src/test/java/org/apache/commons/imaging/formats/webp/WebPReadTest.java +++ b/src/test/java/org/apache/commons/imaging/formats/webp/WebPReadTest.java @@ -16,6 +16,14 @@ */ package org.apache.commons.imaging.formats.webp; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertThrows; +import static org.junit.jupiter.api.Assertions.assertTrue; + +import java.io.File; +import java.io.IOException; + import org.apache.commons.imaging.ImageInfo; import org.apache.commons.imaging.Imaging; import org.apache.commons.imaging.ImagingException; @@ -28,14 +36,6 @@ import org.junit.jupiter.api.Test; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.MethodSource; -import java.io.File; -import java.io.IOException; - -import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertNotNull; -import static org.junit.jupiter.api.Assertions.assertThrows; -import static org.junit.jupiter.api.Assertions.assertTrue; - /** * Tests that read WebP images. */ diff --git a/src/test/java/org/apache/commons/imaging/formats/xbm/XbmBaseTest.java b/src/test/java/org/apache/commons/imaging/formats/xbm/XbmBaseTest.java index a7ed3707..e9667fb5 100644 --- a/src/test/java/org/apache/commons/imaging/formats/xbm/XbmBaseTest.java +++ b/src/test/java/org/apache/commons/imaging/formats/xbm/XbmBaseTest.java @@ -18,8 +18,8 @@ import java.io.File; import java.io.IOException; import java.util.List; -import org.apache.commons.imaging.ImagingException; import org.apache.commons.imaging.AbstractImagingTest; +import org.apache.commons.imaging.ImagingException; public abstract class XbmBaseTest extends AbstractImagingTest { diff --git a/src/test/java/org/apache/commons/imaging/formats/xmp/XmpDumpTest.java b/src/test/java/org/apache/commons/imaging/formats/xmp/XmpDumpTest.java index a93da366..a393b891 100644 --- a/src/test/java/org/apache/commons/imaging/formats/xmp/XmpDumpTest.java +++ b/src/test/java/org/apache/commons/imaging/formats/xmp/XmpDumpTest.java @@ -21,8 +21,8 @@ import static org.junit.jupiter.api.Assertions.assertNotNull; import java.io.File; import java.util.List; -import org.apache.commons.imaging.Imaging; import org.apache.commons.imaging.AbstractImagingTest; +import org.apache.commons.imaging.Imaging; import org.apache.commons.imaging.internal.Debug; import org.junit.jupiter.api.Test; diff --git a/src/test/java/org/apache/commons/imaging/formats/xmp/XmpUpdateTest.java b/src/test/java/org/apache/commons/imaging/formats/xmp/XmpUpdateTest.java index e81170f3..2ffae958 100644 --- a/src/test/java/org/apache/commons/imaging/formats/xmp/XmpUpdateTest.java +++ b/src/test/java/org/apache/commons/imaging/formats/xmp/XmpUpdateTest.java @@ -25,11 +25,11 @@ import java.io.FileOutputStream; import java.nio.file.Files; import java.util.List; +import org.apache.commons.imaging.AbstractImageParser; +import org.apache.commons.imaging.AbstractImagingTest; import org.apache.commons.imaging.ImageFormat; import org.apache.commons.imaging.ImageFormats; -import org.apache.commons.imaging.AbstractImageParser; import org.apache.commons.imaging.Imaging; -import org.apache.commons.imaging.AbstractImagingTest; import org.apache.commons.imaging.common.XmpImagingParameters; import org.apache.commons.imaging.internal.Debug; import org.apache.commons.imaging.internal.ImageParserFactory; diff --git a/src/test/java/org/apache/commons/imaging/formats/xpm/AbstractXpmTest.java b/src/test/java/org/apache/commons/imaging/formats/xpm/AbstractXpmTest.java index b75ca0f6..6041f472 100644 --- a/src/test/java/org/apache/commons/imaging/formats/xpm/AbstractXpmTest.java +++ b/src/test/java/org/apache/commons/imaging/formats/xpm/AbstractXpmTest.java @@ -18,8 +18,8 @@ import java.io.File; import java.io.IOException; import java.util.List; -import org.apache.commons.imaging.ImagingException; import org.apache.commons.imaging.AbstractImagingTest; +import org.apache.commons.imaging.ImagingException; public abstract class AbstractXpmTest extends AbstractImagingTest { diff --git a/src/test/java/org/apache/commons/imaging/palette/PaletteQuantizationTest.java b/src/test/java/org/apache/commons/imaging/palette/PaletteQuantizationTest.java index 9f4b66fe..4e04594f 100644 --- a/src/test/java/org/apache/commons/imaging/palette/PaletteQuantizationTest.java +++ b/src/test/java/org/apache/commons/imaging/palette/PaletteQuantizationTest.java @@ -20,8 +20,8 @@ import static org.junit.jupiter.api.Assertions.assertEquals; import java.awt.image.BufferedImage; -import org.apache.commons.imaging.ImagingException; import org.apache.commons.imaging.AbstractImagingTest; +import org.apache.commons.imaging.ImagingException; import org.junit.jupiter.api.Test; public class PaletteQuantizationTest extends AbstractImagingTest {