From: Robert Varga Date: Mon, 20 Aug 2018 15:30:21 +0000 (+0200) Subject: Switch to spotbugs X-Git-Tag: v2.1.0~14 X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=yangtools.git;a=commitdiff_plain;h=db5a6e505aad87bcb106155160be386767de0aed Switch to spotbugs Findbugs is ancient, spotbugs is a live project, switch to using it. Change-Id: I160bb14eb1b32bc226b1e94955d340c7cc79fa5e Signed-off-by: Robert Varga --- diff --git a/common/concepts/pom.xml b/common/concepts/pom.xml index 61bddb8b32..a62b05e28d 100644 --- a/common/concepts/pom.xml +++ b/common/concepts/pom.xml @@ -61,8 +61,8 @@ - org.codehaus.mojo - findbugs-maven-plugin + com.github.spotbugs + spotbugs-maven-plugin true diff --git a/common/mockito-configuration/pom.xml b/common/mockito-configuration/pom.xml index 71477b4cd6..76d11c7ec0 100644 --- a/common/mockito-configuration/pom.xml +++ b/common/mockito-configuration/pom.xml @@ -47,8 +47,8 @@ - org.codehaus.mojo - findbugs-maven-plugin + com.github.spotbugs + spotbugs-maven-plugin true diff --git a/common/testutils/pom.xml b/common/testutils/pom.xml index e8a7c35b48..05ccf35247 100644 --- a/common/testutils/pom.xml +++ b/common/testutils/pom.xml @@ -76,8 +76,8 @@ - org.codehaus.mojo - findbugs-maven-plugin + com.github.spotbugs + spotbugs-maven-plugin true diff --git a/common/util/pom.xml b/common/util/pom.xml index 68bacdad49..f292fe60b7 100644 --- a/common/util/pom.xml +++ b/common/util/pom.xml @@ -83,8 +83,8 @@ - org.codehaus.mojo - findbugs-maven-plugin + com.github.spotbugs + spotbugs-maven-plugin true diff --git a/third-party/triemap/pom.xml b/third-party/triemap/pom.xml index e41e810d14..ce9bbf1f0e 100644 --- a/third-party/triemap/pom.xml +++ b/third-party/triemap/pom.xml @@ -80,8 +80,8 @@ - org.codehaus.mojo - findbugs-maven-plugin + com.github.spotbugs + spotbugs-maven-plugin true diff --git a/yang/odlext-model-api/pom.xml b/yang/odlext-model-api/pom.xml index 57006d0e2b..1f267f28fb 100644 --- a/yang/odlext-model-api/pom.xml +++ b/yang/odlext-model-api/pom.xml @@ -65,8 +65,8 @@ - org.codehaus.mojo - findbugs-maven-plugin + com.github.spotbugs + spotbugs-maven-plugin true diff --git a/yang/odlext-parser-support/pom.xml b/yang/odlext-parser-support/pom.xml index 46b86f9300..5870372564 100644 --- a/yang/odlext-parser-support/pom.xml +++ b/yang/odlext-parser-support/pom.xml @@ -71,8 +71,8 @@ - org.codehaus.mojo - findbugs-maven-plugin + com.github.spotbugs + spotbugs-maven-plugin true diff --git a/yang/openconfig-model-api/pom.xml b/yang/openconfig-model-api/pom.xml index 440b1c9b30..7e1328742e 100644 --- a/yang/openconfig-model-api/pom.xml +++ b/yang/openconfig-model-api/pom.xml @@ -65,8 +65,8 @@ - org.codehaus.mojo - findbugs-maven-plugin + com.github.spotbugs + spotbugs-maven-plugin true diff --git a/yang/openconfig-parser-support/pom.xml b/yang/openconfig-parser-support/pom.xml index 8dc13a07b8..c9cbd5a7c7 100644 --- a/yang/openconfig-parser-support/pom.xml +++ b/yang/openconfig-parser-support/pom.xml @@ -71,8 +71,8 @@ - org.codehaus.mojo - findbugs-maven-plugin + com.github.spotbugs + spotbugs-maven-plugin true diff --git a/yang/rfc6536-model-api/pom.xml b/yang/rfc6536-model-api/pom.xml index 6a00e6043b..96901d1eaf 100644 --- a/yang/rfc6536-model-api/pom.xml +++ b/yang/rfc6536-model-api/pom.xml @@ -65,8 +65,8 @@ - org.codehaus.mojo - findbugs-maven-plugin + com.github.spotbugs + spotbugs-maven-plugin true diff --git a/yang/rfc6536-parser-support/pom.xml b/yang/rfc6536-parser-support/pom.xml index 22ea2d161c..2acfdfbd71 100644 --- a/yang/rfc6536-parser-support/pom.xml +++ b/yang/rfc6536-parser-support/pom.xml @@ -71,8 +71,8 @@ - org.codehaus.mojo - findbugs-maven-plugin + com.github.spotbugs + spotbugs-maven-plugin true diff --git a/yang/rfc7952-model-api/pom.xml b/yang/rfc7952-model-api/pom.xml index f08216d33b..618a699b41 100644 --- a/yang/rfc7952-model-api/pom.xml +++ b/yang/rfc7952-model-api/pom.xml @@ -65,8 +65,8 @@ - org.codehaus.mojo - findbugs-maven-plugin + com.github.spotbugs + spotbugs-maven-plugin true diff --git a/yang/rfc7952-parser-support/pom.xml b/yang/rfc7952-parser-support/pom.xml index bcbea169aa..7482c19f5a 100644 --- a/yang/rfc7952-parser-support/pom.xml +++ b/yang/rfc7952-parser-support/pom.xml @@ -71,8 +71,8 @@ - org.codehaus.mojo - findbugs-maven-plugin + com.github.spotbugs + spotbugs-maven-plugin true diff --git a/yang/rfc8040-model-api/pom.xml b/yang/rfc8040-model-api/pom.xml index 9bb34e67b4..711f813e0f 100644 --- a/yang/rfc8040-model-api/pom.xml +++ b/yang/rfc8040-model-api/pom.xml @@ -65,8 +65,8 @@ - org.codehaus.mojo - findbugs-maven-plugin + com.github.spotbugs + spotbugs-maven-plugin true diff --git a/yang/rfc8040-parser-support/pom.xml b/yang/rfc8040-parser-support/pom.xml index f3bc465cbf..b13beae6d3 100644 --- a/yang/rfc8040-parser-support/pom.xml +++ b/yang/rfc8040-parser-support/pom.xml @@ -71,8 +71,8 @@ - org.codehaus.mojo - findbugs-maven-plugin + com.github.spotbugs + spotbugs-maven-plugin true diff --git a/yang/yang-common/pom.xml b/yang/yang-common/pom.xml index 8e62d8052a..c47b80bcc7 100644 --- a/yang/yang-common/pom.xml +++ b/yang/yang-common/pom.xml @@ -75,8 +75,8 @@ - org.codehaus.mojo - findbugs-maven-plugin + com.github.spotbugs + spotbugs-maven-plugin true diff --git a/yang/yang-data-api/pom.xml b/yang/yang-data-api/pom.xml index c8469423a8..d0ee7c1227 100644 --- a/yang/yang-data-api/pom.xml +++ b/yang/yang-data-api/pom.xml @@ -73,8 +73,8 @@ - org.codehaus.mojo - findbugs-maven-plugin + com.github.spotbugs + spotbugs-maven-plugin true diff --git a/yang/yang-data-codec-xml/pom.xml b/yang/yang-data-codec-xml/pom.xml index c19e5b5dfb..e4cb3e3345 100644 --- a/yang/yang-data-codec-xml/pom.xml +++ b/yang/yang-data-codec-xml/pom.xml @@ -82,8 +82,8 @@ - org.codehaus.mojo - findbugs-maven-plugin + com.github.spotbugs + spotbugs-maven-plugin true diff --git a/yang/yang-maven-plugin-it/pom.xml b/yang/yang-maven-plugin-it/pom.xml index e36f2ef9c9..c2f1c68df6 100644 --- a/yang/yang-maven-plugin-it/pom.xml +++ b/yang/yang-maven-plugin-it/pom.xml @@ -121,8 +121,8 @@ - org.codehaus.mojo - findbugs-maven-plugin + com.github.spotbugs + spotbugs-maven-plugin true diff --git a/yang/yang-maven-plugin-spi/pom.xml b/yang/yang-maven-plugin-spi/pom.xml index e479c12c53..2887dda4fb 100644 --- a/yang/yang-maven-plugin-spi/pom.xml +++ b/yang/yang-maven-plugin-spi/pom.xml @@ -82,8 +82,8 @@ - org.codehaus.mojo - findbugs-maven-plugin + com.github.spotbugs + spotbugs-maven-plugin true diff --git a/yang/yang-model-api/pom.xml b/yang/yang-model-api/pom.xml index f709d3cf62..3fc97201ce 100644 --- a/yang/yang-model-api/pom.xml +++ b/yang/yang-model-api/pom.xml @@ -65,8 +65,8 @@ - org.codehaus.mojo - findbugs-maven-plugin + com.github.spotbugs + spotbugs-maven-plugin true diff --git a/yang/yang-model-util/pom.xml b/yang/yang-model-util/pom.xml index 7bd6d2dbf6..a2c51dc19a 100644 --- a/yang/yang-model-util/pom.xml +++ b/yang/yang-model-util/pom.xml @@ -68,8 +68,8 @@ - org.codehaus.mojo - findbugs-maven-plugin + com.github.spotbugs + spotbugs-maven-plugin true diff --git a/yang/yang-parser-api/pom.xml b/yang/yang-parser-api/pom.xml index 45a3953c6d..bc74b7eb2d 100644 --- a/yang/yang-parser-api/pom.xml +++ b/yang/yang-parser-api/pom.xml @@ -57,8 +57,8 @@ - org.codehaus.mojo - findbugs-maven-plugin + com.github.spotbugs + spotbugs-maven-plugin true diff --git a/yang/yang-parser-impl/pom.xml b/yang/yang-parser-impl/pom.xml index 5c3af205b9..712065fd96 100644 --- a/yang/yang-parser-impl/pom.xml +++ b/yang/yang-parser-impl/pom.xml @@ -146,8 +146,8 @@ - org.codehaus.mojo - findbugs-maven-plugin + com.github.spotbugs + spotbugs-maven-plugin true diff --git a/yang/yang-parser-spi/pom.xml b/yang/yang-parser-spi/pom.xml index be07928884..5836930bb9 100644 --- a/yang/yang-parser-spi/pom.xml +++ b/yang/yang-parser-spi/pom.xml @@ -71,8 +71,8 @@ - org.codehaus.mojo - findbugs-maven-plugin + com.github.spotbugs + spotbugs-maven-plugin true diff --git a/yang/yang-test-util/pom.xml b/yang/yang-test-util/pom.xml index a35cde73ca..a550ab917b 100644 --- a/yang/yang-test-util/pom.xml +++ b/yang/yang-test-util/pom.xml @@ -53,8 +53,8 @@ - org.codehaus.mojo - findbugs-maven-plugin + com.github.spotbugs + spotbugs-maven-plugin true diff --git a/yang/yang-test-util/src/main/java/org/opendaylight/yangtools/yang/test/util/YangParserTestUtils.java b/yang/yang-test-util/src/main/java/org/opendaylight/yangtools/yang/test/util/YangParserTestUtils.java index a395b1899e..e24d5cedba 100644 --- a/yang/yang-test-util/src/main/java/org/opendaylight/yangtools/yang/test/util/YangParserTestUtils.java +++ b/yang/yang-test-util/src/main/java/org/opendaylight/yangtools/yang/test/util/YangParserTestUtils.java @@ -20,6 +20,7 @@ import java.util.Arrays; import java.util.Collection; import java.util.Iterator; import java.util.List; +import java.util.Locale; import java.util.ServiceLoader; import java.util.Set; import java.util.stream.Collectors; @@ -43,7 +44,8 @@ import org.opendaylight.yangtools.yang.model.repo.api.YangTextSchemaSource; public final class YangParserTestUtils { private static final FileFilter YANG_FILE_FILTER = file -> { - final String name = file.getName().toLowerCase(); + // Locale keeps SpotBugs happy. It should not matter that much anyway. + final String name = file.getName().toLowerCase(Locale.ENGLISH); return name.endsWith(YangConstants.RFC6020_YANG_FILE_EXTENSION) && file.isFile(); }; diff --git a/yang/yang-xpath-api/pom.xml b/yang/yang-xpath-api/pom.xml index c323b6636f..0a6778c6d4 100644 --- a/yang/yang-xpath-api/pom.xml +++ b/yang/yang-xpath-api/pom.xml @@ -65,8 +65,8 @@ - org.codehaus.mojo - findbugs-maven-plugin + com.github.spotbugs + spotbugs-maven-plugin true