PMD Results

The following document contains the results of PMD 5.3.2.

Files

org/locationtech/spatial4j/context/SpatialContextFactory.java

Violation Line
Avoid empty catch blocks 271273
Avoid using a branching statement as the last in a loop. 316

org/locationtech/spatial4j/distance/DistanceCalculator.java

Violation Line
Avoid modifiers which are implied by the context 24
Avoid modifiers which are implied by the context 27
Avoid modifiers which are implied by the context 30
Avoid modifiers which are implied by the context 37
Avoid modifiers which are implied by the context 43
Avoid modifiers which are implied by the context 50
Avoid modifiers which are implied by the context 52
Avoid modifiers which are implied by the context 54

org/locationtech/spatial4j/distance/DistanceUtils.java

Violation Line
Useless parentheses. 90
Useless parentheses. 188
Useless parentheses. 200
Useless parentheses. 409
Useless parentheses. 435

org/locationtech/spatial4j/io/BinaryCodec.java

Violation Line
Avoid unused constructor parameters such as 'factory'. 46

org/locationtech/spatial4j/io/GeoJSONReader.java

Violation Line
Avoid unused constructor parameters such as 'factory'. 36
Avoid empty catch blocks 6566
Avoid empty catch blocks 6667
Useless parentheses. 77
Avoid unnecessary return statements 117
Useless parentheses. 121
Useless parentheses. 152
Useless parentheses. 161
Useless parentheses. 174
These nested if statements could be combined 211219
Avoid empty if statements 276278
Useless parentheses. 322
Useless parentheses. 348
Useless parentheses. 355
Useless parentheses. 377

org/locationtech/spatial4j/io/GeoJSONWriter.java

Violation Line
Avoid unused constructor parameters such as 'factory'. 30
Avoid unused constructor parameters such as 'ctx'. 30

org/locationtech/spatial4j/io/GeohashUtils.java

Violation Line
Useless parentheses. 135

org/locationtech/spatial4j/io/LegacyShapeReader.java

Violation Line
Avoid unused constructor parameters such as 'factory'. 43

org/locationtech/spatial4j/io/LegacyShapeWriter.java

Violation Line
Avoid unused constructor parameters such as 'factory'. 44

org/locationtech/spatial4j/io/PolyshapeReader.java

Violation Line
Avoid unused imports such as 'org.locationtech.jts.geom.LinearRing' 33
Avoid unused constructor parameters such as 'factory'. 43
Avoid empty catch blocks 6566
Avoid empty catch blocks 6667
Useless parentheses. 260

org/locationtech/spatial4j/io/PolyshapeWriter.java

Violation Line
Avoid unused constructor parameters such as 'factory'. 51
Avoid unused constructor parameters such as 'ctx'. 51
Useless parentheses. 213

org/locationtech/spatial4j/io/ShapeIO.java

Violation Line
Avoid modifiers which are implied by the context 13
Avoid modifiers which are implied by the context 14
Avoid modifiers which are implied by the context 15
Avoid modifiers which are implied by the context 16
Avoid modifiers which are implied by the context 21

org/locationtech/spatial4j/io/ShapeReader.java

Violation Line
Avoid modifiers which are implied by the context 27
Avoid modifiers which are implied by the context 36
Avoid modifiers which are implied by the context 44

org/locationtech/spatial4j/io/ShapeWriter.java

Violation Line
Avoid modifiers which are implied by the context 23
Avoid modifiers which are implied by the context 28

org/locationtech/spatial4j/io/WKTReader.java

Violation Line
Avoid unused constructor parameters such as 'factory'. 68
Avoid empty catch blocks 664665

org/locationtech/spatial4j/io/jackson/ShapeDeserializer.java

Violation Line
These nested if statements could be combined 150152
These nested if statements could be combined 193195

org/locationtech/spatial4j/io/jts/JtsBinaryCodec.java

Violation Line
Useless parentheses. 39

org/locationtech/spatial4j/io/jts/JtsPolyshapeWriter.java

Violation Line
Avoid unused local variables such as 'dim'. 50

org/locationtech/spatial4j/io/jts/JtsWKTWriter.java

Violation Line
Avoid unused constructor parameters such as 'ctx'. 22
Avoid unused constructor parameters such as 'factory'. 22

org/locationtech/spatial4j/shape/Point.java

Violation Line
Avoid modifiers which are implied by the context 22
Avoid modifiers which are implied by the context 25
Avoid modifiers which are implied by the context 28
Avoid modifiers which are implied by the context 3133
Avoid modifiers which are implied by the context 3638

org/locationtech/spatial4j/shape/Rectangle.java

Violation Line
Avoid modifiers which are implied by the context 28
Avoid modifiers which are implied by the context 34
Avoid modifiers which are implied by the context 40
Avoid modifiers which are implied by the context 43
Avoid modifiers which are implied by the context 46
Avoid modifiers which are implied by the context 49
Avoid modifiers which are implied by the context 52
Avoid modifiers which are implied by the context 55
Avoid modifiers which are implied by the context 61
Avoid modifiers which are implied by the context 67

org/locationtech/spatial4j/shape/Shape.java

Violation Line
Avoid modifiers which are implied by the context 94
Avoid modifiers which are implied by the context 100

org/locationtech/spatial4j/shape/ShapeCollection.java

Violation Line
Useless parentheses. 115

org/locationtech/spatial4j/shape/impl/CircleImpl.java

Violation Line
These nested if statements could be combined 171172
These nested if statements could be combined 190194

org/locationtech/spatial4j/shape/impl/GeoCircle.java

Violation Line
Avoid unused method parameters such as 'ctx'. 143
Useless parentheses. 200

org/locationtech/spatial4j/shape/impl/InfBufLine.java

Violation Line
Useless parentheses. 78
Useless parentheses. 129
Useless parentheses. 130

org/locationtech/spatial4j/shape/impl/RectangleImpl.java

Violation Line
Useless parentheses. 112
Useless parentheses. 211

org/locationtech/spatial4j/shape/jts/JtsGeometry.java

Violation Line
Avoid duplicate imports such as 'org.locationtech.spatial4j.shape.Point' 16
Useless parentheses. 86
Useless parentheses. 86
Unnecessary use of fully qualified name 'org.locationtech.jts.geom.Point' due to existing import 'org.locationtech.jts.geom.*' 299
Unnecessary use of fully qualified name 'org.locationtech.jts.geom.Point' due to existing import 'org.locationtech.jts.geom.*' 300
Unnecessary use of fully qualified name 'org.locationtech.jts.geom.Point' due to existing import 'org.locationtech.jts.geom.*' 300
Unnecessary use of fully qualified name 'org.locationtech.jts.geom.Point' due to existing import 'org.locationtech.jts.geom.*' 368
Useless parentheses. 442

org/locationtech/spatial4j/shape/jts/JtsPoint.java

Violation Line
Unnecessary use of fully qualified name 'org.locationtech.spatial4j.shape.Point' due to existing import 'org.locationtech.spatial4j.shape.Point' 46
Unnecessary use of fully qualified name 'org.locationtech.spatial4j.shape.Point' due to existing import 'org.locationtech.spatial4j.shape.Point' 75

org/locationtech/spatial4j/shape/jts/JtsShapeFactory.java

Violation Line
Unnecessary use of fully qualified name 'org.locationtech.jts.geom.Point' due to existing import 'org.locationtech.jts.geom.*' 479
Unnecessary use of fully qualified name 'org.locationtech.jts.geom.Point' due to existing import 'org.locationtech.jts.geom.*' 480
Unnecessary use of fully qualified name 'org.locationtech.jts.geom.Point' due to existing import 'org.locationtech.jts.geom.*' 480
These nested if statements could be combined 487495