Apache Commons logo Commons Imaging™ logo

PMD Results

The following document contains the results of PMD 5.2.1.

Files

org/apache/commons/imaging/ColorTools.java

Violation Line
Each class should declare at least one constructor 42248

org/apache/commons/imaging/FormatCompliance.java

Violation Line
Consider using varargs for methods or constructors which take an array the last parameter. 92
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 139

org/apache/commons/imaging/ImageDump.java

Violation Line
Each class should declare at least one constructor 3199

org/apache/commons/imaging/ImageParser.java

Violation Line
Consider using varargs for methods or constructors which take an array the last parameter. 190
Consider using varargs for methods or constructors which take an array the last parameter. 412
Consider using varargs for methods or constructors which take an array the last parameter. 469
Consider using varargs for methods or constructors which take an array the last parameter. 596
Consider using varargs for methods or constructors which take an array the last parameter. 700
Consider using varargs for methods or constructors which take an array the last parameter. 794

org/apache/commons/imaging/Imaging.java

Violation Line
Consider using varargs for methods or constructors which take an array the last parameter. 201
Consider using varargs for methods or constructors which take an array the last parameter. 226
Consider using varargs for methods or constructors which take an array the last parameter. 365
Avoid protected methods in a final class that doesnt extend anything other than Object. Change to private or package access. 455472
Consider using varargs for methods or constructors which take an array the last parameter. 488
Consider using varargs for methods or constructors which take an array the last parameter. 600
Consider using varargs for methods or constructors which take an array the last parameter. 663
Consider using varargs for methods or constructors which take an array the last parameter. 804
Consider using varargs for methods or constructors which take an array the last parameter. 899
Consider using varargs for methods or constructors which take an array the last parameter. 982
Consider using varargs for methods or constructors which take an array the last parameter. 1130
Consider using varargs for methods or constructors which take an array the last parameter. 1168
Consider using varargs for methods or constructors which take an array the last parameter. 1222
Consider using varargs for methods or constructors which take an array the last parameter. 1319

org/apache/commons/imaging/color/ColorCmyk.java

Violation Line
Avoid using if statements without curly braces 131

org/apache/commons/imaging/common/BinaryConstant.java

Violation Line
Consider using varargs for methods or constructors which take an array the last parameter. 26
Consider using varargs for methods or constructors which take an array the last parameter. 47

org/apache/commons/imaging/common/BinaryFunctions.java

Violation Line
Consider using varargs for methods or constructors which take an array the last parameter. 36
Consider using varargs for methods or constructors which take an array the last parameter. 269

org/apache/commons/imaging/common/BinaryOutputStream.java

Violation Line
Consider using varargs for methods or constructors which take an array the last parameter. 62

org/apache/commons/imaging/common/GenericImageMetadata.java

Violation Line
Each class should declare at least one constructor 22101

org/apache/commons/imaging/common/PackBits.java

Violation Line
Each class should declare at least one constructor 25163
Consider using varargs for methods or constructors which take an array the last parameter. 108

org/apache/commons/imaging/common/RgbBufferedImageFactory.java

Violation Line
Each class should declare at least one constructor 2238

org/apache/commons/imaging/common/SimpleBufferedImageFactory.java

Violation Line
Each class should declare at least one constructor 2241

org/apache/commons/imaging/common/bytesource/ByteSourceArray.java

Violation Line
Consider using varargs for methods or constructors which take an array the last parameter. 26
Consider using varargs for methods or constructors which take an array the last parameter. 31

org/apache/commons/imaging/common/bytesource/ByteSourceInputStream.java

Violation Line
Consider using varargs for methods or constructors which take an array the last parameter. 43
Each class should declare at least one constructor 89203

org/apache/commons/imaging/common/itu_t4/HuffmanTree.java

Violation Line
Each class should declare at least one constructor 2690

org/apache/commons/imaging/common/itu_t4/T4_T6_Tables.java

Violation Line
Each class should declare at least one constructor 19262

org/apache/commons/imaging/common/mylzw/MyLzwCompressor.java

Violation Line
Consider using varargs for methods or constructors which take an array the last parameter. 229

org/apache/commons/imaging/common/mylzw/MyLzwDecompressor.java

Violation Line
Consider using varargs for methods or constructors which take an array the last parameter. 103
Consider using varargs for methods or constructors which take an array the last parameter. 107
Consider using varargs for methods or constructors which take an array the last parameter. 126

org/apache/commons/imaging/formats/bmp/BmpWriterRgb.java

Violation Line
Each class should declare at least one constructor 2582

org/apache/commons/imaging/formats/bmp/PixelParser.java

Violation Line
Consider using varargs for methods or constructors which take an array the last parameter. 34

org/apache/commons/imaging/formats/bmp/PixelParserBitFields.java

Violation Line
Consider using varargs for methods or constructors which take an array the last parameter. 40

org/apache/commons/imaging/formats/bmp/PixelParserRgb.java

Violation Line
Consider using varargs for methods or constructors which take an array the last parameter. 31

org/apache/commons/imaging/formats/bmp/PixelParserRle.java

Violation Line
Consider using varargs for methods or constructors which take an array the last parameter. 27

org/apache/commons/imaging/formats/bmp/PixelParserSimple.java

Violation Line
Consider using varargs for methods or constructors which take an array the last parameter. 25

org/apache/commons/imaging/formats/dcx/DcxImageParser.java

Violation Line
Consider using varargs for methods or constructors which take an array the last parameter. 114

org/apache/commons/imaging/formats/gif/GifImageParser.java

Violation Line
Consider using varargs for methods or constructors which take an array the last parameter. 220
Consider using varargs for methods or constructors which take an array the last parameter. 610
Consider using varargs for methods or constructors which take an array the last parameter. 745
Avoid unused private methods such as 'writeAsSubBlocks(OutputStream,byte)'. 745
Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() 1072

org/apache/commons/imaging/formats/gif/ImageDescriptor.java

Violation Line
Consider using varargs for methods or constructors which take an array the last parameter. 39

org/apache/commons/imaging/formats/icns/IcnsDecoder.java

Violation Line
Consider using varargs for methods or constructors which take an array the last parameter. 193

org/apache/commons/imaging/formats/icns/IcnsImageParser.java

Violation Line
Consider using varargs for methods or constructors which take an array the last parameter. 177
Consider using varargs for methods or constructors which take an array the last parameter. 222

org/apache/commons/imaging/formats/icns/Rle24Compression.java

Violation Line
Consider using varargs for methods or constructors which take an array the last parameter. 23

org/apache/commons/imaging/formats/ico/IcoImageParser.java

Violation Line
Consider using varargs for methods or constructors which take an array the last parameter. 541

org/apache/commons/imaging/formats/jpeg/JpegImageMetadata.java

Violation Line
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 225

org/apache/commons/imaging/formats/jpeg/JpegImageParser.java

Violation Line
Consider using varargs for methods or constructors which take an array the last parameter. 101
Consider using varargs for methods or constructors which take an array the last parameter. 146
Consider using varargs for methods or constructors which take an array the last parameter. 154
Consider using varargs for methods or constructors which take an array the last parameter. 413
Consider using varargs for methods or constructors which take an array the last parameter. 421
Consider using varargs for methods or constructors which take an array the last parameter. 455
Consider using varargs for methods or constructors which take an array the last parameter. 463
Consider using varargs for methods or constructors which take an array the last parameter. 497
Consider using varargs for methods or constructors which take an array the last parameter. 505
Consider using varargs for methods or constructors which take an array the last parameter. 550
Consider using varargs for methods or constructors which take an array the last parameter. 558

org/apache/commons/imaging/formats/jpeg/JpegUtils.java

Violation Line
Consider using varargs for methods or constructors which take an array the last parameter. 41
Consider using varargs for methods or constructors which take an array the last parameter. 46
Consider using varargs for methods or constructors which take an array the last parameter. 173
Consider using varargs for methods or constructors which take an array the last parameter. 182

org/apache/commons/imaging/formats/jpeg/decoder/Dct.java

Violation Line
Consider using varargs for methods or constructors which take an array the last parameter. 104
Consider using varargs for methods or constructors which take an array the last parameter. 110
Consider using varargs for methods or constructors which take an array the last parameter. 116
Consider using varargs for methods or constructors which take an array the last parameter. 125
Consider using varargs for methods or constructors which take an array the last parameter. 139
Consider using varargs for methods or constructors which take an array the last parameter. 180
Consider using varargs for methods or constructors which take an array the last parameter. 261
Consider using varargs for methods or constructors which take an array the last parameter. 308

org/apache/commons/imaging/formats/jpeg/decoder/JpegDecoder.java

Violation Line
Perhaps 'block' could be replaced by a local variable. 62
Consider using varargs for methods or constructors which take an array the last parameter. 70
Consider using varargs for methods or constructors which take an array the last parameter. 176
System.arraycopy is more efficient 215217
Consider using varargs for methods or constructors which take an array the last parameter. 246
Consider using varargs for methods or constructors which take an array the last parameter. 304

org/apache/commons/imaging/formats/jpeg/decoder/ZigZag.java

Violation Line
Consider using varargs for methods or constructors which take an array the last parameter. 33
Consider using varargs for methods or constructors which take an array the last parameter. 39

org/apache/commons/imaging/formats/jpeg/exif/ExifRewriter.java

Violation Line
Consider using varargs for methods or constructors which take an array the last parameter. 98
Consider using varargs for methods or constructors which take an array the last parameter. 116
Consider using varargs for methods or constructors which take an array the last parameter. 125
Consider using varargs for methods or constructors which take an array the last parameter. 153
Consider using varargs for methods or constructors which take an array the last parameter. 161
Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() 381
Consider using varargs for methods or constructors which take an array the last parameter. 501

org/apache/commons/imaging/formats/jpeg/iptc/IptcBlock.java

Violation Line
Consider using varargs for methods or constructors which take an array the last parameter. 28

org/apache/commons/imaging/formats/jpeg/iptc/IptcParser.java

Violation Line
Consider using varargs for methods or constructors which take an array the last parameter. 50

org/apache/commons/imaging/formats/jpeg/iptc/JpegIptcRewriter.java

Violation Line
Each class should declare at least one constructor 41315

org/apache/commons/imaging/formats/jpeg/segments/App13Segment.java

Violation Line
Consider using varargs for methods or constructors which take an array the last parameter. 35

org/apache/commons/imaging/formats/jpeg/segments/App14Segment.java

Violation Line
Consider using varargs for methods or constructors which take an array the last parameter. 44

org/apache/commons/imaging/formats/jpeg/segments/App2Segment.java

Violation Line
Consider using varargs for methods or constructors which take an array the last parameter. 33

org/apache/commons/imaging/formats/jpeg/segments/ComSegment.java

Violation Line
Consider using varargs for methods or constructors which take an array the last parameter. 24

org/apache/commons/imaging/formats/jpeg/segments/DhtSegment.java

Violation Line
Consider using varargs for methods or constructors which take an array the last parameter. 46
Consider using varargs for methods or constructors which take an array the last parameter. 147
System.arraycopy is more efficient 164168

org/apache/commons/imaging/formats/jpeg/segments/DqtSegment.java

Violation Line
Consider using varargs for methods or constructors which take an array the last parameter. 37
Consider using varargs for methods or constructors which take an array the last parameter. 51

org/apache/commons/imaging/formats/jpeg/segments/GenericSegment.java

Violation Line
Consider using varargs for methods or constructors which take an array the last parameter. 35

org/apache/commons/imaging/formats/jpeg/segments/JfifSegment.java

Violation Line
Consider using varargs for methods or constructors which take an array the last parameter. 44

org/apache/commons/imaging/formats/jpeg/segments/SofnSegment.java

Violation Line
Consider using varargs for methods or constructors which take an array the last parameter. 49

org/apache/commons/imaging/formats/jpeg/segments/SosSegment.java

Violation Line
Consider using varargs for methods or constructors which take an array the last parameter. 46

org/apache/commons/imaging/formats/jpeg/segments/UnknownSegment.java

Violation Line
Consider using varargs for methods or constructors which take an array the last parameter. 27

org/apache/commons/imaging/formats/jpeg/xmp/JpegRewriter.java

Violation Line
Consider using varargs for methods or constructors which take an array the last parameter. 96
Consider using varargs for methods or constructors which take an array the last parameter. 104
Consider using varargs for methods or constructors which take an array the last parameter. 168
Consider using varargs for methods or constructors which take an array the last parameter. 196
Consider using varargs for methods or constructors which take an array the last parameter. 204
Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() 305

org/apache/commons/imaging/formats/jpeg/xmp/JpegXmpParser.java

Violation Line
Consider using varargs for methods or constructors which take an array the last parameter. 34
Consider using varargs for methods or constructors which take an array the last parameter. 38

org/apache/commons/imaging/formats/jpeg/xmp/JpegXmpRewriter.java

Violation Line
Each class should declare at least one constructor 38204

org/apache/commons/imaging/formats/pcx/PcxImageParser.java

Violation Line
Consider using varargs for methods or constructors which take an array the last parameter. 309

org/apache/commons/imaging/formats/pcx/PcxWriter.java

Violation Line
Consider using varargs for methods or constructors which take an array the last parameter. 96

org/apache/commons/imaging/formats/png/PhysicalScale.java

Violation Line
A class which only has private constructors should be final 2261

org/apache/commons/imaging/formats/png/PngColorType.java

Violation Line
Consider using varargs for methods or constructors which take an array the last parameter. 38

org/apache/commons/imaging/formats/png/PngCrc.java

Violation Line
Each class should declare at least one constructor 2085
Consider using varargs for methods or constructors which take an array the last parameter. 53

org/apache/commons/imaging/formats/png/PngImageParser.java

Violation Line
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 98
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 99
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 100
Consider using varargs for methods or constructors which take an array the last parameter. 134

org/apache/commons/imaging/formats/png/PngWriter.java

Violation Line
Consider using varargs for methods or constructors which take an array the last parameter. 72
Consider using varargs for methods or constructors which take an array the last parameter. 202
Avoid unused private methods such as 'writeChunkTRNS(OutputStream,Palette)'. 266
Consider using varargs for methods or constructors which take an array the last parameter. 280

org/apache/commons/imaging/formats/png/chunks/PngChunk.java

Violation Line
Consider using varargs for methods or constructors which take an array the last parameter. 35

org/apache/commons/imaging/formats/png/chunks/PngChunkGama.java

Violation Line
Consider using varargs for methods or constructors which take an array the last parameter. 27

org/apache/commons/imaging/formats/png/chunks/PngChunkIccp.java

Violation Line
Perhaps 'compressedProfile' could be replaced by a local variable. 31
Consider using varargs for methods or constructors which take an array the last parameter. 40

org/apache/commons/imaging/formats/png/chunks/PngChunkIdat.java

Violation Line
Consider using varargs for methods or constructors which take an array the last parameter. 21

org/apache/commons/imaging/formats/png/chunks/PngChunkIhdr.java

Violation Line
Consider using varargs for methods or constructors which take an array the last parameter. 37

org/apache/commons/imaging/formats/png/chunks/PngChunkItxt.java

Violation Line
Consider using varargs for methods or constructors which take an array the last parameter. 46

org/apache/commons/imaging/formats/png/chunks/PngChunkPhys.java

Violation Line
Consider using varargs for methods or constructors which take an array the last parameter. 29

org/apache/commons/imaging/formats/png/chunks/PngChunkPlte.java

Violation Line
Consider using varargs for methods or constructors which take an array the last parameter. 30

org/apache/commons/imaging/formats/png/chunks/PngChunkScal.java

Violation Line
Consider using varargs for methods or constructors which take an array the last parameter. 30
New exception is thrown in catch block, original stack trace may be lost 61

org/apache/commons/imaging/formats/png/chunks/PngChunkText.java

Violation Line
Consider using varargs for methods or constructors which take an array the last parameter. 30

org/apache/commons/imaging/formats/png/chunks/PngChunkZtxt.java

Violation Line
Consider using varargs for methods or constructors which take an array the last parameter. 34

org/apache/commons/imaging/formats/png/chunks/PngTextChunk.java

Violation Line
Consider using varargs for methods or constructors which take an array the last parameter. 23

org/apache/commons/imaging/formats/png/scanlinefilters/ScanlineFilter.java

Violation Line
Consider using varargs for methods or constructors which take an array the last parameter. 25

org/apache/commons/imaging/formats/png/scanlinefilters/ScanlineFilterAverage.java

Violation Line
Consider using varargs for methods or constructors which take an array the last parameter. 31

org/apache/commons/imaging/formats/png/scanlinefilters/ScanlineFilterNone.java

Violation Line
Each class should declare at least one constructor 2330
Consider using varargs for methods or constructors which take an array the last parameter. 26

org/apache/commons/imaging/formats/png/scanlinefilters/ScanlineFilterPaeth.java

Violation Line
Consider using varargs for methods or constructors which take an array the last parameter. 48

org/apache/commons/imaging/formats/png/scanlinefilters/ScanlineFilterSub.java

Violation Line
Consider using varargs for methods or constructors which take an array the last parameter. 31

org/apache/commons/imaging/formats/png/scanlinefilters/ScanlineFilterUp.java

Violation Line
Each class should declare at least one constructor 2344
Consider using varargs for methods or constructors which take an array the last parameter. 26

org/apache/commons/imaging/formats/png/transparencyfilters/TransparencyFilter.java

Violation Line
Consider using varargs for methods or constructors which take an array the last parameter. 27

org/apache/commons/imaging/formats/png/transparencyfilters/TransparencyFilterGrayscale.java

Violation Line
Consider using varargs for methods or constructors which take an array the last parameter. 29

org/apache/commons/imaging/formats/png/transparencyfilters/TransparencyFilterIndexedColor.java

Violation Line
Consider using varargs for methods or constructors which take an array the last parameter. 25

org/apache/commons/imaging/formats/png/transparencyfilters/TransparencyFilterTrueColor.java

Violation Line
Consider using varargs for methods or constructors which take an array the last parameter. 29

org/apache/commons/imaging/formats/pnm/PamFileInfo.java

Violation Line
Each class should declare at least one constructor 111114
Each class should declare at least one constructor 146173

org/apache/commons/imaging/formats/pnm/PamWriter.java

Violation Line
Each class should declare at least one constructor 2773

org/apache/commons/imaging/formats/pnm/PbmWriter.java

Violation Line
Private field 'rawbits' could be made final; it is only initialized in the declaration or constructor. 28

org/apache/commons/imaging/formats/pnm/PgmWriter.java

Violation Line
Private field 'rawbits' could be made final; it is only initialized in the declaration or constructor. 28

org/apache/commons/imaging/formats/pnm/PnmImageParser.java

Violation Line
Avoid using if statements without curly braces 160161
Avoid using if statements without curly braces 165166
Avoid using if statements without curly braces 170171
Avoid using if statements without curly braces 175176
Avoid using if statements without curly braces 180181

org/apache/commons/imaging/formats/pnm/PpmWriter.java

Violation Line
Private field 'rawbits' could be made final; it is only initialized in the declaration or constructor. 28

org/apache/commons/imaging/formats/psd/ImageResourceBlock.java

Violation Line
Consider using varargs for methods or constructors which take an array the last parameter. 28

org/apache/commons/imaging/formats/psd/ImageResourceType.java

Violation Line
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 125
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 126
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 128

org/apache/commons/imaging/formats/psd/PsdImageParser.java

Violation Line
Consider using varargs for methods or constructors which take an array the last parameter. 170
Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() 420
Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() 740
Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() 758

org/apache/commons/imaging/formats/psd/dataparsers/DataParser.java

Violation Line
Each class should declare at least one constructor 2545

org/apache/commons/imaging/formats/psd/dataparsers/DataParserBitmap.java

Violation Line
Each class should declare at least one constructor 2146

org/apache/commons/imaging/formats/psd/dataparsers/DataParserCmyk.java

Violation Line
Each class should declare at least one constructor 2245

org/apache/commons/imaging/formats/psd/dataparsers/DataParserGrayscale.java

Violation Line
Each class should declare at least one constructor 2139

org/apache/commons/imaging/formats/psd/dataparsers/DataParserIndexed.java

Violation Line
Consider using varargs for methods or constructors which take an array the last parameter. 24

org/apache/commons/imaging/formats/psd/dataparsers/DataParserLab.java

Violation Line
Each class should declare at least one constructor 2240

org/apache/commons/imaging/formats/psd/dataparsers/DataParserRgb.java

Violation Line
Each class should declare at least one constructor 2141

org/apache/commons/imaging/formats/psd/dataparsers/DataParserStub.java

Violation Line
Each class should declare at least one constructor 2133

org/apache/commons/imaging/formats/psd/datareaders/CompressedDataReader.java

Violation Line
Private field 'dataParser' could be made final; it is only initialized in the declaration or constructor. 38

org/apache/commons/imaging/formats/psd/datareaders/UncompressedDataReader.java

Violation Line
Private field 'dataParser' could be made final; it is only initialized in the declaration or constructor. 35

org/apache/commons/imaging/formats/rgbe/RgbeInfo.java

Violation Line
Consider using varargs for methods or constructors which take an array the last parameter. 171

org/apache/commons/imaging/formats/tiff/JpegImageData.java

Violation Line
Consider using varargs for methods or constructors which take an array the last parameter. 21

org/apache/commons/imaging/formats/tiff/TiffElement.java

Violation Line
Consider using varargs for methods or constructors which take an array the last parameter. 51

org/apache/commons/imaging/formats/tiff/TiffField.java

Violation Line
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 385386
System.arraycopy is more efficient 471473
System.arraycopy is more efficient 478480
System.arraycopy is more efficient 485487

org/apache/commons/imaging/formats/tiff/TiffImageData.java

Violation Line
Each class should declare at least one constructor 30179
Consider using varargs for methods or constructors which take an array the last parameter. 146

org/apache/commons/imaging/formats/tiff/TiffImageMetadata.java

Violation Line
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 529532
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 533536

org/apache/commons/imaging/formats/tiff/TiffImageParser.java

Violation Line
Each class should declare at least one constructor 58744
Unnecessary use of fully qualified name 'TiffConstants.PARAM_KEY_SUBIMAGE_X' due to existing import 'org.apache.commons.imaging.formats.tiff.constants.TiffConstants' 516
Unnecessary use of fully qualified name 'TiffConstants.PARAM_KEY_SUBIMAGE_Y' due to existing import 'org.apache.commons.imaging.formats.tiff.constants.TiffConstants' 517
Unnecessary use of fully qualified name 'TiffConstants.PARAM_KEY_SUBIMAGE_WIDTH' due to existing import 'org.apache.commons.imaging.formats.tiff.constants.TiffConstants' 518
Unnecessary use of fully qualified name 'TiffConstants.PARAM_KEY_SUBIMAGE_HEIGHT' due to existing import 'org.apache.commons.imaging.formats.tiff.constants.TiffConstants' 519
StringBuffer constructor is initialized with size 16, but has at least 23 characters appended. 539

org/apache/commons/imaging/formats/tiff/TiffReader.java

Violation Line
Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() 399
Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() 412

org/apache/commons/imaging/formats/tiff/TiffTags.java

Violation Line
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 52
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 53
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 54
Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() 130

org/apache/commons/imaging/formats/tiff/constants/GpsTagConstants.java

Violation Line
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 4345
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 47
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 48
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 5052
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 5557
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 59
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 60
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 6264
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 6769
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 71
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 72
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 7476
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 7981
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 8486
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 8991
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 93
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 94
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 9698
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 100
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 101
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 103105
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 108110
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 112
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 113
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 114
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 116118
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 121123
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 125
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 126
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 128130
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 133135
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 137
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 138
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 140142
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 145147
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 150152
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 154
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 155
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 157159
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 162164
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 166
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 167
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 169171
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 174176
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 178
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 179
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 181183
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 186188
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 190
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 191
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 192
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 194196
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 199201
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 204206
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 209211
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 214216
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 218
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 219
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 222238

org/apache/commons/imaging/formats/tiff/datareaders/DataReader.java

Violation Line
Consider using varargs for methods or constructors which take an array the last parameter. 97
Consider using varargs for methods or constructors which take an array the last parameter. 120

org/apache/commons/imaging/formats/tiff/fieldtypes/FieldTypeLong.java

Violation Line
System.arraycopy is more efficient 5052

org/apache/commons/imaging/formats/tiff/photometricinterpreters/PhotometricInterpreterPalette.java

Violation Line
Consider using varargs for methods or constructors which take an array the last parameter. 34

org/apache/commons/imaging/formats/tiff/taginfos/TagInfoAscii.java

Violation Line
Consider using varargs for methods or constructors which take an array the last parameter. 32

org/apache/commons/imaging/formats/tiff/taginfos/TagInfoDouble.java

Violation Line
Consider using varargs for methods or constructors which take an array the last parameter. 30

org/apache/commons/imaging/formats/tiff/taginfos/TagInfoFloat.java

Violation Line
Consider using varargs for methods or constructors which take an array the last parameter. 30

org/apache/commons/imaging/formats/tiff/taginfos/TagInfoLong.java

Violation Line
Consider using varargs for methods or constructors which take an array the last parameter. 35

org/apache/commons/imaging/formats/tiff/taginfos/TagInfoLongOrIFD.java

Violation Line
Consider using varargs for methods or constructors which take an array the last parameter. 35

org/apache/commons/imaging/formats/tiff/taginfos/TagInfoRational.java

Violation Line
Consider using varargs for methods or constructors which take an array the last parameter. 31

org/apache/commons/imaging/formats/tiff/taginfos/TagInfoSLong.java

Violation Line
Consider using varargs for methods or constructors which take an array the last parameter. 30

org/apache/commons/imaging/formats/tiff/taginfos/TagInfoSRational.java

Violation Line
Consider using varargs for methods or constructors which take an array the last parameter. 31

org/apache/commons/imaging/formats/tiff/taginfos/TagInfoSShort.java

Violation Line
Consider using varargs for methods or constructors which take an array the last parameter. 30

org/apache/commons/imaging/formats/tiff/taginfos/TagInfoShort.java

Violation Line
Consider using varargs for methods or constructors which take an array the last parameter. 30

org/apache/commons/imaging/formats/tiff/write/TiffImageWriterLossless.java

Violation Line
Consider using varargs for methods or constructors which take an array the last parameter. 62
Consider using varargs for methods or constructors which take an array the last parameter. 66

org/apache/commons/imaging/formats/tiff/write/TiffOutputField.java

Violation Line
Consider using varargs for methods or constructors which take an array the last parameter. 41
Consider using varargs for methods or constructors which take an array the last parameter. 46
Consider using varargs for methods or constructors which take an array the last parameter. 105
Consider using varargs for methods or constructors which take an array the last parameter. 109
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 139
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 140
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 141
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 143
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 144
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 145
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 146
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 148
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 149

org/apache/commons/imaging/formats/tiff/write/TiffOutputItem.java

Violation Line
Each class should declare at least one constructor 2477
Consider using varargs for methods or constructors which take an array the last parameter. 48
Consider using varargs for methods or constructors which take an array the last parameter. 63

org/apache/commons/imaging/formats/tiff/write/TiffOutputSet.java

Violation Line
Avoid protected methods in a final class that doesnt extend anything other than Object. Change to private or package access. 4655
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 261
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 262
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 263
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 265
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 266
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 267
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 282
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 284

org/apache/commons/imaging/formats/wbmp/WbmpImageParser.java

Violation Line
Each class should declare at least one constructor 47294

org/apache/commons/imaging/formats/xbm/XbmImageParser.java

Violation Line
Each class should declare at least one constructor 52413

org/apache/commons/imaging/icc/IccProfileInfo.java

Violation Line
Consider using varargs for methods or constructors which take an array the last parameter. 50

org/apache/commons/imaging/icc/IccProfileParser.java

Violation Line
Consider using varargs for methods or constructors which take an array the last parameter. 47
Consider using varargs for methods or constructors which take an array the last parameter. 292

org/apache/commons/imaging/icc/IccTag.java

Violation Line
Consider using varargs for methods or constructors which take an array the last parameter. 50

org/apache/commons/imaging/icc/IccTagDataType.java

Violation Line
Consider using varargs for methods or constructors which take an array the last parameter. 29

org/apache/commons/imaging/icc/IccTagDataTypes.java

Violation Line
Consider using varargs for methods or constructors which take an array the last parameter. 33
Consider using varargs for methods or constructors which take an array the last parameter. 60
Consider using varargs for methods or constructors which take an array the last parameter. 79
Consider using varargs for methods or constructors which take an array the last parameter. 98
Consider using varargs for methods or constructors which take an array the last parameter. 129

org/apache/commons/imaging/palette/ColorGroup.java

Violation Line
Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() 53

org/apache/commons/imaging/palette/ColorSpaceSubset.java

Violation Line
Consider using varargs for methods or constructors which take an array the last parameter. 48
Consider using varargs for methods or constructors which take an array the last parameter. 134

org/apache/commons/imaging/palette/LongestAxisMedianCut.java

Violation Line
Each class should declare at least one constructor 26142

org/apache/commons/imaging/palette/MedianCutPalette.java

Violation Line
Consider using varargs for methods or constructors which take an array the last parameter. 22

org/apache/commons/imaging/palette/MostPopulatedBoxesMedianCut.java

Violation Line
Each class should declare at least one constructor 27164

org/apache/commons/imaging/palette/PaletteFactory.java

Violation Line
Each class should declare at least one constructor 34531
Consider using varargs for methods or constructors which take an array the last parameter. 480

org/apache/commons/imaging/palette/SimplePalette.java

Violation Line
Consider using varargs for methods or constructors which take an array the last parameter. 22

org/apache/commons/imaging/util/Debug.java

Violation Line
Consider using varargs for methods or constructors which take an array the last parameter. 49
Consider using varargs for methods or constructors which take an array the last parameter. 64
Consider using varargs for methods or constructors which take an array the last parameter. 99
StringBuffer constructor is initialized with size 16, but has at least 18 characters appended. 119
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 150
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 151
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 152
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 153
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 154
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 155
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 156
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 157
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 158
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 159
Consider using varargs for methods or constructors which take an array the last parameter. 193
Consider using varargs for methods or constructors which take an array the last parameter. 197
Consider using varargs for methods or constructors which take an array the last parameter. 224
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 261
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 262264
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 265
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 266
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 268
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 270
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 271