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. 340
Avoid protected methods in a final class that doesnt extend anything other than Object. Change to private or package access. 430447
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. 575
Consider using varargs for methods or constructors which take an array the last parameter. 638
Consider using varargs for methods or constructors which take an array the last parameter. 779
Consider using varargs for methods or constructors which take an array the last parameter. 874
Consider using varargs for methods or constructors which take an array the last parameter. 957
Consider using varargs for methods or constructors which take an array the last parameter. 1105
Consider using varargs for methods or constructors which take an array the last parameter. 1143
Consider using varargs for methods or constructors which take an array the last parameter. 1197
Consider using varargs for methods or constructors which take an array the last parameter. 1294

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 24155
Consider using varargs for methods or constructors which take an array the last parameter. 107

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/BmpImageParser.java

Violation Line
Too many static imports may lead to messy code 17797

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
Too many static imports may lead to messy code 171074
Consider using varargs for methods or constructors which take an array the last parameter. 225
Consider using varargs for methods or constructors which take an array the last parameter. 608
Consider using varargs for methods or constructors which take an array the last parameter. 743
Avoid unused private methods such as 'writeAsSubBlocks(OutputStream,byte)'. 743
Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() 1065

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. 176
Consider using varargs for methods or constructors which take an array the last parameter. 221

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
Too many static imports may lead to messy code 17823
Consider using varargs for methods or constructors which take an array the last parameter. 536

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. 43
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. 166
Consider using varargs for methods or constructors which take an array the last parameter. 175

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. 102
Consider using varargs for methods or constructors which take an array the last parameter. 108
Consider using varargs for methods or constructors which take an array the last parameter. 114
Consider using varargs for methods or constructors which take an array the last parameter. 123
Consider using varargs for methods or constructors which take an array the last parameter. 137
Consider using varargs for methods or constructors which take an array the last parameter. 178
Consider using varargs for methods or constructors which take an array the last parameter. 259
Consider using varargs for methods or constructors which take an array the last parameter. 306

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 214216
Consider using varargs for methods or constructors which take an array the last parameter. 245
Consider using varargs for methods or constructors which take an array the last parameter. 303

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. 99
Consider using varargs for methods or constructors which take an array the last parameter. 117
Consider using varargs for methods or constructors which take an array the last parameter. 126
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. 162
Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() 382
Consider using varargs for methods or constructors which take an array the last parameter. 502

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. 30

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

Violation Line
Too many static imports may lead to messy code 18452
Consider using varargs for methods or constructors which take an array the last parameter. 54

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

Violation Line
Each class should declare at least one constructor 41312

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

Violation Line
Avoid unused constructor parameters such as 'parser'. 31
Consider using varargs for methods or constructors which take an array the last parameter. 31

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. 45
Consider using varargs for methods or constructors which take an array the last parameter. 134
System.arraycopy is more efficient 151155

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. 172
Consider using varargs for methods or constructors which take an array the last parameter. 200
Consider using varargs for methods or constructors which take an array the last parameter. 208
Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() 309

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
Too many static imports may lead to messy code 17542
Consider using varargs for methods or constructors which take an array the last parameter. 304

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
Too many static imports may lead to messy code 17742
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 101
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 102
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 103
Consider using varargs for methods or constructors which take an array the last parameter. 130

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

Violation Line
Consider using varargs for methods or constructors which take an array the last parameter. 71
Consider using varargs for methods or constructors which take an array the last parameter. 201
Avoid unused private methods such as 'writeChunkTRNS(OutputStream,Palette)'. 262
Consider using varargs for methods or constructors which take an array the last parameter. 276

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 159160
Avoid using if statements without curly braces 164165
Avoid using if statements without curly braces 169170
Avoid using if statements without curly braces 174175
Avoid using if statements without curly braces 179180

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
Too many static imports may lead to messy code 17741
Consider using varargs for methods or constructors which take an array the last parameter. 167
Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() 391
Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() 705
Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() 723

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. 37

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. 34

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. 524527
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 528531

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

Violation Line
Each class should declare at least one constructor 58739
Unnecessary use of fully qualified name 'TiffConstants.PARAM_KEY_SUBIMAGE_X' due to existing import 'org.apache.commons.imaging.formats.tiff.constants.TiffConstants' 510
Unnecessary use of fully qualified name 'TiffConstants.PARAM_KEY_SUBIMAGE_Y' due to existing import 'org.apache.commons.imaging.formats.tiff.constants.TiffConstants' 511
Unnecessary use of fully qualified name 'TiffConstants.PARAM_KEY_SUBIMAGE_WIDTH' due to existing import 'org.apache.commons.imaging.formats.tiff.constants.TiffConstants' 512
Unnecessary use of fully qualified name 'TiffConstants.PARAM_KEY_SUBIMAGE_HEIGHT' due to existing import 'org.apache.commons.imaging.formats.tiff.constants.TiffConstants' 513
StringBuffer constructor is initialized with size 16, but has at least 23 characters appended. 533

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

Violation Line
Too many static imports may lead to messy code 17501
Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() 385
Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() 398

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. 4547
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 49
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 50
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 5254
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 5759
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 61
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 62
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 6466
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 6971
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 73
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 74
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 7678
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 8183
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 8688
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 9193
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 95
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 96
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 98100
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 102
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 103
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 105107
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 110112
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. 115
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 116
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 118120
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 123125
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 127
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 128
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 130132
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 135137
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 139
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 140
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 142144
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 147149
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 152154
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 156
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 157
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 159161
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 164166
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 168
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 169
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 171173
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 176178
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 180
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 181
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 183185
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 188190
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. 193
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 194
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 196198
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 201203
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 206208
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 211213
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 216218
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 220
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 221
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 224240

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

Violation Line
Too many static imports may lead to messy code 17226
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. 128

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/TagInfoDoubles.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/TagInfoFloats.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/TagInfoLongs.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/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/TagInfoRationals.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/TagInfoSLongs.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/TagInfoSRationals.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/TagInfoSShorts.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/taginfos/TagInfoShorts.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. 63
Consider using varargs for methods or constructors which take an array the last parameter. 67

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. 260
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. 264
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. 281
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 283

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

Violation Line
Each class should declare at least one constructor 47282

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

Violation Line
Each class should declare at least one constructor 51401

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. 48
Consider using varargs for methods or constructors which take an array the last parameter. 293

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

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

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. 32
Consider using varargs for methods or constructors which take an array the last parameter. 53
Consider using varargs for methods or constructors which take an array the last parameter. 66
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. 104

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. 133

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 34530
Consider using varargs for methods or constructors which take an array the last parameter. 479

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