diff --git a/build.xml b/build.xml
index bda1613d3e..4e9d883270 100644
a
|
b
|
Build-Date: ${build.tstamp}
|
1149 | 1149 | <ivy:report todir="${tools.dir}/ivy-report" graph="false"/> |
1150 | 1150 | </target> |
1151 | 1151 | <target name="ivy-checkdepsupdate" description="Display dependency updates on the console" depends="resolve"> |
| 1152 | <ivy:resolve log="download-only" file="${tools.ivy}" keep="true" conf="*"/> |
1152 | 1153 | <ivy:checkdepsupdate/> |
1153 | 1154 | </target> |
1154 | 1155 | <target name="api-dependency-tree" description="Displays Ivy dependency tree for JOSM API" depends="resolve"> |
diff --git a/ivy.xml b/ivy.xml
index d6fa0b3232..69388fcfc5 100644
a
|
b
|
|
24 | 24 | <dependency conf="api->default" org="javax.json" name="javax.json-api" rev="1.1.4"/> |
25 | 25 | <dependency conf="api->default" org="org.glassfish" name="javax.json" rev="1.1.4"/> |
26 | 26 | <dependency conf="api->default" org="org.apache.commons" name="commons-jcs3-core" rev="3.0"/> |
27 | | <dependency conf="api->default" org="org.apache.commons" name="commons-compress" rev="1.20"/> |
| 27 | <dependency conf="api->default" org="org.apache.commons" name="commons-compress" rev="1.21"/> |
28 | 28 | <dependency conf="api->default" org="com.google.code.findbugs" name="jsr305" rev="3.0.2"/> |
29 | 29 | <dependency conf="api->default" org="org.tukaani" name="xz" rev="1.9"/> |
30 | 30 | <dependency conf="api->default" org="com.adobe.xmp" name="xmpcore" rev="6.1.11"/> |
31 | 31 | <dependency conf="api->default" org="com.drewnoakes" name="metadata-extractor" rev="2.16.0" transitive="false"/> |
32 | 32 | <dependency conf="api->default" org="com.formdev" name="svgSalamander" rev="1.1.2.4"/> |
33 | | <dependency conf="api->default" org="ch.poole" name="OpeningHoursParser" rev="0.24.0"/> |
| 33 | <dependency conf="api->default" org="ch.poole" name="OpeningHoursParser" rev="0.26.0"/> |
34 | 34 | <dependency conf="api->default" org="oauth.signpost" name="signpost-core" rev="2.1.1"/> |
35 | 35 | <dependency conf="api->default" org="org.webjars.npm" name="tag2link" rev="2021.3.21"/> |
36 | 36 | <!-- sources->sources --> |
… |
… |
|
38 | 38 | <dependency conf="sources->sources" org="javax.json" name="javax.json-api" rev="1.1.4"/> |
39 | 39 | <dependency conf="sources->sources" org="org.glassfish" name="javax.json" rev="1.1.4"/> |
40 | 40 | <dependency conf="sources->sources" org="org.apache.commons" name="commons-jcs3-core" rev="3.0"/> |
41 | | <dependency conf="sources->sources" org="org.apache.commons" name="commons-compress" rev="1.20"/> |
| 41 | <dependency conf="sources->sources" org="org.apache.commons" name="commons-compress" rev="1.21"/> |
42 | 42 | <dependency conf="sources->sources" org="com.google.code.findbugs" name="jsr305" rev="3.0.2"/> |
43 | 43 | <dependency conf="sources->sources" org="org.tukaani" name="xz" rev="1.9"/> |
44 | 44 | <dependency conf="sources->sources" org="com.adobe.xmp" name="xmpcore" rev="6.1.11"/> |
45 | 45 | <dependency conf="sources->sources" org="com.drewnoakes" name="metadata-extractor" rev="2.16.0" transitive="false"/> |
46 | 46 | <dependency conf="sources->sources" org="com.formdev" name="svgSalamander" rev="1.1.2.4"/> |
47 | | <dependency conf="sources->sources" org="ch.poole" name="OpeningHoursParser" rev="0.24.0"/> |
| 47 | <dependency conf="sources->sources" org="ch.poole" name="OpeningHoursParser" rev="0.26.0"/> |
48 | 48 | <dependency conf="sources->sources" org="oauth.signpost" name="signpost-core" rev="2.1.1"/> |
49 | 49 | <dependency conf="sources->default" org="org.webjars.npm" name="tag2link" rev="2021.3.21"/><!-- sources->default sic! (tag2link-sources.jar is empty, see #19335) --> |
50 | 50 | <!-- commonslang->default --> |
… |
… |
|
55 | 55 | </dependency> |
56 | 56 | <dependency conf="jmockit->default" org="org.jmockit" name="jmockit" rev="1.49.a"/> |
57 | 57 | <!-- test->default --> |
58 | | <dependency conf="test->default" org="com.github.spotbugs" name="spotbugs-annotations" rev="4.3.0"/> |
| 58 | <dependency conf="test->default" org="com.github.spotbugs" name="spotbugs-annotations" rev="4.5.0"/> |
59 | 59 | <dependency conf="test->default" org="com.ginsberg" name="junit5-system-exit" rev="1.1.1"/> |
60 | | <dependency conf="test->default" org="com.github.tomakehurst" name="wiremock" rev="2.27.2"/> |
61 | | <dependency conf="test->default" org="io.github.classgraph" name="classgraph" rev="4.8.110"/> |
62 | | <dependency conf="test->default" org="org.junit.platform" name="junit-platform-launcher" rev="1.7.2"/> |
63 | | <dependency conf="test->default" org="org.junit.vintage" name="junit-vintage-engine" rev="5.7.2"/> |
64 | | <dependency conf="test->default" org="org.junit.jupiter" name="junit-jupiter-params" rev="5.7.2"/> |
65 | | <dependency conf="test->default" org="org.junit.jupiter" name="junit-jupiter-api" rev="5.7.2"/> |
66 | | <dependency conf="test->default" org="org.junit.jupiter" name="junit-jupiter-engine" rev="5.7.2"/> |
67 | | <dependency conf="test->default" org="org.junit.jupiter" name="junit-jupiter-migrationsupport" rev="5.7.2"/> |
| 60 | <dependency conf="test->default" org="com.github.tomakehurst" name="wiremock-jre8" rev="2.31.0"/> |
| 61 | <dependency conf="test->default" org="io.github.classgraph" name="classgraph" rev="4.8.135"/> |
| 62 | <dependency conf="test->default" org="org.junit.platform" name="junit-platform-launcher" rev="1.8.1"/> |
| 63 | <dependency conf="test->default" org="org.junit.vintage" name="junit-vintage-engine" rev="5.8.1"/> |
| 64 | <dependency conf="test->default" org="org.junit.jupiter" name="junit-jupiter-params" rev="5.8.1"/> |
| 65 | <dependency conf="test->default" org="org.junit.jupiter" name="junit-jupiter-api" rev="5.8.1"/> |
| 66 | <dependency conf="test->default" org="org.junit.jupiter" name="junit-jupiter-engine" rev="5.8.1"/> |
| 67 | <dependency conf="test->default" org="org.junit.jupiter" name="junit-jupiter-migrationsupport" rev="5.8.1"/> |
68 | 68 | <dependency conf="test->default" org="net.trajano.commons" name="commons-testing" rev="2.1.0"/> |
69 | | <dependency conf="test->default" org="nl.jqno.equalsverifier" name="equalsverifier" rev="3.6.1"/> |
| 69 | <dependency conf="test->default" org="nl.jqno.equalsverifier" name="equalsverifier" rev="3.7.2"/> |
70 | 70 | <dependency conf="test->default" org="org.apache.commons" name="commons-lang3" rev="3.12.0"/> |
71 | | <dependency conf="test->default" org="org.awaitility" name="awaitility" rev="4.1.0"/> |
| 71 | <dependency conf="test->default" org="org.awaitility" name="awaitility" rev="4.1.1"/> |
72 | 72 | </dependencies> |
73 | 73 | </ivy-module> |
diff --git a/src/org/openstreetmap/josm/actions/OpenFileAction.java b/src/org/openstreetmap/josm/actions/OpenFileAction.java
index 70a2936342..b288284581 100644
a
|
b
|
public class OpenFileAction extends DiskAccessAction {
|
247 | 247 | } |
248 | 248 | |
249 | 249 | protected void alertFilesWithUnknownImporter(Collection<File> files) { |
250 | | final StringBuilder msg = new StringBuilder(128).append("<html>").append( |
| 250 | final StringBuilder msg = new StringBuilder(115 + 30 * files.size()).append("<html>").append( |
251 | 251 | trn("Cannot open {0} file because file does not exist or no suitable file importer is available.", |
252 | 252 | "Cannot open {0} files because files do not exist or no suitable file importer is available.", |
253 | 253 | files.size(), |
diff --git a/src/org/openstreetmap/josm/actions/mapmode/ExtrudeAction.java b/src/org/openstreetmap/josm/actions/mapmode/ExtrudeAction.java
index cd6419d304..3339dd2805 100644
a
|
b
|
public class ExtrudeAction extends MapMode implements MapViewPaintable, KeyPress
|
263 | 263 | rv.append(' ').append(tr("Segment collapsed due to its direction reversing.")); |
264 | 264 | } |
265 | 265 | } else { |
266 | | if (mode == Mode.translate) |
| 266 | if (mode == Mode.translate) { |
267 | 267 | rv = new StringBuilder(tr("Move a segment along its normal, then release the mouse button.")); |
268 | | else if (mode == Mode.translate_node) |
| 268 | } else if (mode == Mode.translate_node) { |
269 | 269 | rv = new StringBuilder(tr("Move the node along one of the segments, then release the mouse button.")); |
270 | | else if (mode == Mode.extrude || mode == Mode.create_new) |
| 270 | } else if (mode == Mode.extrude || mode == Mode.create_new) { |
271 | 271 | rv = new StringBuilder(tr("Draw a rectangle of the desired size, then release the mouse button.")); |
272 | | else { |
| 272 | } else { |
273 | 273 | Logging.warn("Extrude: unknown mode " + mode); |
274 | 274 | rv = new StringBuilder(); |
275 | 275 | } |
diff --git a/src/org/openstreetmap/josm/data/osm/DefaultNameFormatter.java b/src/org/openstreetmap/josm/data/osm/DefaultNameFormatter.java
index b81786b62f..300b63c5a9 100644
a
|
b
|
public class DefaultNameFormatter implements NameFormatter, HistoryNameFormatter
|
565 | 565 | sb.append(way.get("ref")); |
566 | 566 | } |
567 | 567 | if (sb.length() == 0) { |
568 | | sb.append( |
569 | | way.hasKey("highway") ? tr("highway") : |
570 | | way.hasKey("railway") ? tr("railway") : |
571 | | way.hasKey("waterway") ? tr("waterway") : |
572 | | way.hasKey("landuse") ? tr("landuse") : "" |
573 | | ); |
| 568 | if (way.hasKey("highway")) { |
| 569 | sb.append(tr("highway")); |
| 570 | } else if (way.hasKey("railway")) { |
| 571 | sb.append("railway"); |
| 572 | } else if (way.hasKey("waterway")) { |
| 573 | sb.append(tr("waterway")); |
| 574 | } else if (way.hasKey("landuse")) { |
| 575 | sb.append(tr("landuse")); |
| 576 | } |
574 | 577 | } |
575 | 578 | |
576 | 579 | int nodesNo = way.isClosed() ? (way.getNumNodes() -1) : way.getNumNodes(); |
… |
… |
public class DefaultNameFormatter implements NameFormatter, HistoryNameFormatter
|
580 | 583 | } |
581 | 584 | /* note: length == 0 should no longer happen, but leave the bracket code |
582 | 585 | nevertheless, who knows what future brings */ |
583 | | sb.append((sb.length() > 0) ? (" ("+nodes+')') : nodes); |
| 586 | if (sb.length() > 0) { |
| 587 | sb.append(" (").append(nodes).append(')'); |
| 588 | } else { |
| 589 | sb.append(nodes); |
| 590 | } |
584 | 591 | decorateNameWithId(sb, way); |
585 | 592 | return sb.toString(); |
586 | 593 | } |
diff --git a/src/org/openstreetmap/josm/data/osm/visitor/paint/AbstractMapRenderer.java b/src/org/openstreetmap/josm/data/osm/visitor/paint/AbstractMapRenderer.java
index 8569f52144..1d00a63aad 100644
a
|
b
|
public abstract class AbstractMapRenderer implements Rendering {
|
182 | 182 | } |
183 | 183 | |
184 | 184 | /** |
185 | | * Reads all the settings from preferences. Calls the @{link #getColors} |
| 185 | * Reads all the settings from preferences. Calls the {@link #getColors} |
186 | 186 | * function. |
187 | 187 | * |
188 | 188 | * @param virtual <code>true</code> if virtual nodes are used |
diff --git a/src/org/openstreetmap/josm/data/validation/routines/DomainValidator.java b/src/org/openstreetmap/josm/data/validation/routines/DomainValidator.java
index 6ddb1fb98e..fce0b91810 100644
a
|
b
|
public final class DomainValidator extends AbstractValidator {
|
1969 | 1969 | * @param input the string to convert, not null |
1970 | 1970 | * @return converted input, or original input if conversion fails |
1971 | 1971 | */ |
| 1972 | /* Ignore UnicodeEscape errors (ErrorProne doesn't like the switch statement, and using literals would be confusing) */ |
| 1973 | @SuppressWarnings("UnicodeEscape") |
1972 | 1974 | // Needed by UrlValidator |
1973 | 1975 | public static String unicodeToASCII(String input) { |
1974 | 1976 | if (isOnlyASCII(input)) { // skip possibly expensive processing |
… |
… |
public final class DomainValidator extends AbstractValidator {
|
1990 | 1992 | // (halfwidth ideographic full stop). |
1991 | 1993 | char lastChar = input.charAt(length-1); // fetch original last char |
1992 | 1994 | switch(lastChar) { |
1993 | | case '\u002E': // "." full stop |
| 1995 | case '.': // "." full stop, AKA U+002E |
1994 | 1996 | case '\u3002': // ideographic full stop |
1995 | 1997 | case '\uFF0E': // fullwidth full stop |
1996 | 1998 | case '\uFF61': // halfwidth ideographic full stop |
diff --git a/src/org/openstreetmap/josm/data/validation/tests/Addresses.java b/src/org/openstreetmap/josm/data/validation/tests/Addresses.java
index 0c3473bc43..11170dee89 100644
a
|
b
|
public class Addresses extends Test {
|
363 | 363 | static double getDistance(OsmPrimitive a, OsmPrimitive b) { |
364 | 364 | LatLon centerA = a.getBBox().getCenter(); |
365 | 365 | LatLon centerB = b.getBBox().getCenter(); |
366 | | return (centerA.greatCircleDistance(centerB)); |
| 366 | return centerA.greatCircleDistance(centerB); |
367 | 367 | } |
368 | 368 | |
369 | 369 | protected void checkDistance(OsmPrimitive house, Collection<Way> street) { |
diff --git a/src/org/openstreetmap/josm/gui/dialogs/properties/PropertiesDialog.java b/src/org/openstreetmap/josm/gui/dialogs/properties/PropertiesDialog.java
index cb1818bb31..5fd62166f4 100644
a
|
b
|
implements DataSelectionListener, ActiveLayerChangeListener, DataSetListenerAdap
|
574 | 574 | } |
575 | 575 | |
576 | 576 | /** |
577 | | * Update selection status, call @{link #selectionChanged} function. |
| 577 | * Update selection status, call {@link #selectionChanged} function. |
578 | 578 | */ |
579 | 579 | private void updateSelection() { |
580 | 580 | // Parameter is ignored in this class |
diff --git a/src/org/openstreetmap/josm/io/ozi/OziWptReader.java b/src/org/openstreetmap/josm/io/ozi/OziWptReader.java
index 223ee85e57..0510b69329 100644
a
|
b
|
public class OziWptReader implements IGpxReader {
|
73 | 73 | Logging.trace(line); |
74 | 74 | } else { |
75 | 75 | try { |
76 | | String[] fields = line.split(","); |
| 76 | String[] fields = line.split(",", -1); |
77 | 77 | WayPoint currentwp = new WayPoint(new LatLon( |
78 | 78 | Double.parseDouble(fields[IDX_LAT]), |
79 | 79 | Double.parseDouble(fields[IDX_LON]))); |
diff --git a/src/org/openstreetmap/josm/tools/HttpClient.java b/src/org/openstreetmap/josm/tools/HttpClient.java
index 9e9a7d89a5..18eb5964ec 100644
a
|
b
|
public abstract class HttpClient {
|
378 | 378 | * @see HttpURLConnection#getInputStream() |
379 | 379 | * @see HttpURLConnection#getErrorStream() |
380 | 380 | */ |
381 | | @SuppressWarnings("resource") |
| 381 | @SuppressWarnings({"resource", |
| 382 | /* All 4 `InputStream in` reassignments would close the original when the returned stream is closed */ |
| 383 | "PMD.CloseResource"}) |
382 | 384 | public final InputStream getContent() throws IOException { |
383 | | InputStream in = getInputStream(); |
384 | | in = new ProgressInputStream(in, getContentLength(), monitor); |
385 | | in = "gzip".equalsIgnoreCase(getContentEncoding()) |
386 | | ? new GZIPInputStream(in) |
387 | | : "deflate".equalsIgnoreCase(getContentEncoding()) |
388 | | ? new InflaterInputStream(in) |
389 | | : in; |
| 385 | InputStream in = new ProgressInputStream(getInputStream(), getContentLength(), monitor); |
| 386 | if ("gzip".equalsIgnoreCase(getContentEncoding())) { |
| 387 | in = new GZIPInputStream(in); |
| 388 | } else if ("deflate".equalsIgnoreCase(getContentEncoding())) { |
| 389 | in = new InflaterInputStream(in); |
| 390 | } |
390 | 391 | Compression compression = Compression.NONE; |
391 | 392 | if (uncompress) { |
392 | 393 | final String contentType = getContentType(); |
diff --git a/tools/checkstyle/src/org/openstreetmap/josm/TopLevelJavadocCheck.java b/tools/checkstyle/src/org/openstreetmap/josm/TopLevelJavadocCheck.java
index 26e59ee9ac..2c406dfabf 100644
a
|
b
|
public class TopLevelJavadocCheck extends AbstractCheck {
|
86 | 86 | @Override |
87 | 87 | public void visitToken(DetailAST ast) { |
88 | 88 | DetailAST parent = ast.getParent(); |
89 | | if (parent == null || parent.getType() == TokenTypes.EOF) { |
| 89 | if (parent == null || parent.getType() == TokenTypes.COMPILATION_UNIT) { |
90 | 90 | foundTopLevelClass = true; |
91 | 91 | if (!hasJavadoc(ast)) { |
92 | 92 | this.log(ast.getLineNo(), "incomplete or missing Javadoc for top level class or interface"); |
diff --git a/tools/ivy.xml b/tools/ivy.xml
index 6a8202bb42..3fceb51515 100644
a
|
b
|
|
17 | 17 | <!-- javacc->default --> |
18 | 18 | <dependency org="net.java.dev.javacc" name="javacc" rev="7.0.10" conf="javacc->default"/> |
19 | 19 | <!-- checkstyle->default --> |
20 | | <dependency org="com.puppycrawl.tools" name="checkstyle" rev="8.44" conf="checkstyle->default"/> |
| 20 | <dependency org="com.puppycrawl.tools" name="checkstyle" rev="9.1" conf="checkstyle->default"/> |
21 | 21 | <!-- proguard->default --> |
22 | 22 | <dependency org="com.guardsquare" name="proguard-ant" rev="7.2.0-beta2" conf="proguard->default"/> |
23 | 23 | <!-- pmd->default --> |
24 | | <dependency org="net.sourceforge.pmd" name="pmd-core" rev="6.20.0" conf="pmd->default"/> |
25 | | <dependency org="net.sourceforge.pmd" name="pmd-java" rev="6.20.0" conf="pmd->default"/> |
| 24 | <dependency org="net.sourceforge.pmd" name="pmd-core" rev="6.40.0" conf="pmd->default"/> |
| 25 | <dependency org="net.sourceforge.pmd" name="pmd-java" rev="6.40.0" conf="pmd->default"/> |
26 | 26 | <dependency org="net.sourceforge.saxon" name="saxon" rev="9.1.0.8" conf="pmd->default"> |
27 | 27 | <artifact name="saxon" type="jar"/> |
28 | 28 | <artifact name="saxon" type="jar" maven:classifier="dom"/> |
29 | 29 | </dependency> |
30 | 30 | <!-- spotbugs->default --> |
31 | | <dependency org="com.github.spotbugs" name="spotbugs" rev="4.2.3" conf="spotbugs->default"/> |
32 | | <dependency org="com.github.spotbugs" name="spotbugs-ant" rev="4.2.3" conf="spotbugs->default"/> |
| 31 | <dependency org="com.github.spotbugs" name="spotbugs" rev="4.5.0" conf="spotbugs->default"/> |
| 32 | <dependency org="com.github.spotbugs" name="spotbugs-ant" rev="4.5.0" conf="spotbugs->default"/> |
33 | 33 | <!-- errorprone->default --> |
34 | | <dependency org="com.google.errorprone" name="error_prone_core" rev="2.8.1" conf="errorprone->default"/> |
| 34 | <dependency org="com.google.errorprone" name="error_prone_core" rev="2.10.0" conf="errorprone->default"/> |
35 | 35 | <!-- errorprone->default --> |
36 | 36 | <dependency org="com.google.errorprone" name="javac" rev="9+181-r4173-1" conf="errorprone_javac->default"/> |
37 | 37 | <!-- semanticdb->default --> |
diff --git a/tools/pmd/josm-ruleset.xml b/tools/pmd/josm-ruleset.xml
index 34676b4a8c..fde1d3d72d 100644
a
|
b
|
|
3 | 3 | xmlns="http://pmd.sourceforge.net/ruleset/2.0.0" |
4 | 4 | xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
5 | 5 | xsi:schemaLocation="http://pmd.sourceforge.net/ruleset/2.0.0 http://pmd.sourceforge.net/ruleset_2_0_0.xsd"> |
6 | | |
| 6 | |
7 | 7 | <description>JOSM PMD ruleset</description> |
8 | | |
| 8 | |
9 | 9 | <rule ref="category/java/bestpractices.xml"> |
10 | 10 | <exclude name="AccessorClassGeneration"/> |
11 | 11 | <exclude name="AccessorMethodGeneration"/> |
… |
… |
|
21 | 21 | <exclude name="GuardLogStatement"/> |
22 | 22 | <exclude name="JUnit4TestShouldUseAfterAnnotation"/> |
23 | 23 | <exclude name="JUnit4TestShouldUseTestAnnotation"/> |
| 24 | <exclude name="LiteralsFirstInComparisons" reason="Introduced in 6.24, some positives in source code at this time. Replaces PositionLiteralsFirstInComparisons."/> |
24 | 25 | <exclude name="LooseCoupling"/> |
25 | 26 | <exclude name="MethodReturnsInternalArray"/> |
26 | 27 | <exclude name="OneDeclarationPerLine"/> |
27 | | <exclude name="PositionLiteralsFirstInComparisons"/> |
28 | 28 | <exclude name="PreserveStackTrace"/> |
29 | 29 | <exclude name="ReplaceHashtableWithMap"/> |
30 | 30 | <exclude name="SwitchStmtsShouldHaveDefault"/> |
31 | 31 | <exclude name="SystemPrintln"/> |
| 32 | <exclude name="UnusedAssignment" reason="Introduced in 6.26, some number of positives in source code at this time"/> |
32 | 33 | <exclude name="UnusedFormalParameter"/> |
| 34 | <exclude name="UnusedPrivateMethod" reason="Broken since PMD 6.33, see https://github.com/pmd/pmd/issues/3468"/> |
33 | 35 | <exclude name="UseVarargs"/> |
34 | 36 | </rule> |
35 | 37 | <rule ref="category/java/bestpractices.xml/PreserveStackTrace"> |
… |
… |
|
39 | 41 | </rule> |
40 | 42 | <rule ref="category/java/bestpractices.xml/UnusedFormalParameter"> |
41 | 43 | <properties> |
42 | | <property name="violationSuppressXPath" value="//Annotation[MarkerAnnotation/Name/@Image='Deprecated']/..[MethodDeclaration|ConstructorDeclaration]"/> |
| 44 | <property name="violationSuppressXPath" value="//Annotation[MarkerAnnotation/Name/@SimpleName='Deprecated']/..[MethodDeclaration|ConstructorDeclaration]"/> |
43 | 45 | </properties> |
44 | 46 | </rule> |
45 | 47 | <rule ref="category/java/codestyle.xml"> |
… |
… |
|
72 | 74 | <exclude name="ShortMethodName"/> |
73 | 75 | <exclude name="ShortVariable"/> |
74 | 76 | <exclude name="TooManyStaticImports"/> |
| 77 | <exclude name="UnnecessaryCast" reason="Introduced in 6.24, some positives in source code at this time"/> |
75 | 78 | <exclude name="UnnecessaryConstructor"/> |
76 | | <exclude name="UselessParentheses"/> |
77 | 79 | <exclude name="UseUnderscoresInNumericLiterals"/> |
| 80 | <exclude name="UselessParentheses"/> |
78 | 81 | <exclude name="VariableNamingConventions"/> |
79 | 82 | <exclude name="WhileLoopsMustUseBraces"/> |
80 | 83 | </rule> |
81 | 84 | <rule ref="category/java/codestyle.xml/ShortMethodName"> |
82 | 85 | <properties> |
83 | | <property name="violationSuppressXPath" value="//MethodDeclarator[@Image='at' or @Image='ht' or @Image='of' or @Image='ok' or @Image='tr'] |
84 | | | //MethodDeclarator/../../Annotation/MarkerAnnotation/Name[@Image='Deprecated'] |
85 | | | //MethodDeclarator/../../../..[@Image='LambertConformalConic']"/> |
| 86 | <property name="violationSuppressXPath" value="//MethodDeclaration[@Name='at' or @Name='ht' or @Name='of' or @Name='ok' or @Name='tr'] |
| 87 | | //MethodDeclaration/../../Annotation/MarkerAnnotation/Name[@Image='Deprecated'] |
| 88 | | //MethodDeclaration/../../../..[@Image='LambertConformalConic']"/> |
86 | 89 | </properties> |
87 | 90 | </rule> |
88 | 91 | <rule ref="category/java/codestyle.xml/MethodNamingConventions"> |
89 | 92 | <properties> |
90 | | <property name="violationSuppressXPath" value="//MethodDeclarator/../../../..[@Image='Functions' or @Image='PseudoClasses' or @Image='Role' or @Image='TaggingPreset']"/> |
| 93 | <property name="violationSuppressXPath" value="//MethodDeclaration/../../..[@SimpleName='Functions' or @SimpleName='PseudoClasses' or @SimpleName='Role' or @SimpleName='TaggingPreset']"/> |
91 | 94 | </properties> |
92 | 95 | </rule> |
93 | 96 | <rule ref="category/java/codestyle.xml/FieldNamingConventions"> |
… |
… |
|
95 | 98 | <property name="enumConstantPattern" value="[A-Za-z][A-Za-z_0-9]*"/> |
96 | 99 | <property name="violationSuppressXPath" value="//FieldDeclaration[@Public='true'] |
97 | 100 | | //FieldDeclaration/../Annotation/MarkerAnnotation/Name[@Image='pref'] |
98 | | | //FieldDeclaration/Type/ReferenceType/ClassOrInterfaceType[@Image!='Boolean' and |
99 | | @Image!='Byte' and |
100 | | @Image!='Character' and |
101 | | @Image!='Class' and |
102 | | @Image!='Double' and |
103 | | @Image!='Enum' and |
104 | | @Image!='Float' and |
| 101 | | //FieldDeclaration/Type/ReferenceType/ClassOrInterfaceType[@Image!='Boolean' and |
| 102 | @Image!='Byte' and |
| 103 | @Image!='Character' and |
| 104 | @Image!='Class' and |
| 105 | @Image!='Double' and |
| 106 | @Image!='Enum' and |
| 107 | @Image!='Float' and |
105 | 108 | @Image!='Integer' and |
106 | 109 | @Image!='Long' and |
107 | 110 | @Image!='Number' and |
108 | | @Image!='Short' and |
| 111 | @Image!='Short' and |
109 | 112 | @Image!='String' ]"/> |
110 | 113 | </properties> |
111 | 114 | </rule> |
… |
… |
|
118 | 121 | <exclude name="AvoidCatchingGenericException"/> |
119 | 122 | <exclude name="AvoidDeeplyNestedIfStmts"/> |
120 | 123 | <exclude name="AvoidRethrowingException"/> |
| 124 | <exclude name="CognitiveComplexity" reason="Introduced in 6.35, some number of positives in source code at this time"/> |
121 | 125 | <exclude name="CollapsibleIfStatements"/> |
122 | 126 | <exclude name="CouplingBetweenObjects"/> |
123 | 127 | <exclude name="CyclomaticComplexity"/> |
… |
… |
|
132 | 136 | <exclude name="ImmutableField"/> |
133 | 137 | <exclude name="LawOfDemeter"/> |
134 | 138 | <exclude name="LoosePackageCoupling"/> |
| 139 | <exclude name="MutableStaticState" reason="Introduced in 6.35, some number of positives in source code at this time"/> |
135 | 140 | <exclude name="NcssCount"/> |
136 | 141 | <exclude name="NPathComplexity"/> |
137 | 142 | <exclude name="SignatureDeclareThrowsException"/> |
… |
… |
|
167 | 172 | <exclude name="CompareObjectsWithEquals"/> |
168 | 173 | <exclude name="ConstructorCallsOverridableMethod"/> |
169 | 174 | <exclude name="DataflowAnomalyAnalysis"/> |
170 | | <exclude name="DoNotCallSystemExit"/> |
| 175 | <exclude name="DoNotTerminateVM"/> |
171 | 176 | <exclude name="DontImportSun"/> |
172 | 177 | <exclude name="EmptyIfStmt"/> |
173 | 178 | <exclude name="EmptyWhileStmt"/> |
174 | | <exclude name="MissingBreakInSwitch"/> |
| 179 | <exclude name="ImplicitSwitchFallThrough"/> |
175 | 180 | <exclude name="MissingSerialVersionUID"/> |
176 | 181 | <exclude name="MissingStaticMethodInNonInstantiatableClass"/> |
177 | 182 | <exclude name="NonStaticInitializer"/> |
178 | 183 | <exclude name="NullAssignment"/> |
179 | 184 | <exclude name="ReturnEmptyArrayRatherThanNull"/> |
| 185 | <exclude name="ReturnEmptyCollectionRatherThanNull" reason="Introduced in 6.37, there are positives in source code at this time"/> |
180 | 186 | <exclude name="SimpleDateFormatNeedsLocale"/> |
181 | 187 | <exclude name="SingleMethodSingleton"/> |
182 | 188 | <exclude name="SingletonClassReturningNewInstance"/> |
183 | 189 | <exclude name="TestClassWithoutTestCases"/> |
184 | 190 | <exclude name="UseProperClassLoader"/> |
185 | 191 | </rule> |
| 192 | <rule ref="category/java/errorprone.xml/AvoidAccessibilityAlteration"> |
| 193 | <properties> |
| 194 | <property name="violationSuppressXPath" value="//MethodDeclaration/../../..[@SimpleName='ReflectionUtils']"/> |
| 195 | </properties> |
| 196 | </rule> |
186 | 197 | <rule ref="category/java/performance.xml"> |
187 | 198 | <exclude name="AvoidInstantiatingObjectsInLoops"/> |
188 | 199 | <exclude name="AvoidUsingShortType"/> |
189 | 200 | <exclude name="ConsecutiveLiteralAppends"/> |
190 | 201 | <exclude name="InefficientEmptyStringCheck"/> |
191 | 202 | <exclude name="SimplifyStartsWith"/> |
| 203 | <exclude name="InsufficientStringBufferDeclaration" reason="PMD 6.40 has a bug where it doesn't properly count appended strings in if statements."/> |
192 | 204 | <exclude name="TooFewBranchesForASwitchStatement"/> |
193 | 205 | <exclude name="UseArrayListInsteadOfVector"/> |
194 | 206 | <exclude name="UselessStringValueOf"/> |