config: update to forbiddenapis 2.1 (#3216)
config: update to forbiddenapis 2.1
This commit is contained in:
parent
feebf53719
commit
ff896f7db0
|
|
@ -34,7 +34,7 @@
|
|||
<!-- we can not change it as, Check name is part of API (used in configurations) -->
|
||||
<suppress checks="AbbreviationAsWordInName"
|
||||
files="XMLLogger.java"
|
||||
lines="43"/>
|
||||
lines="44"/>
|
||||
<!-- test should be named as their main class -->
|
||||
<suppress checks="AbbreviationAsWordInName"
|
||||
files="XMLLoggerTest.java"
|
||||
|
|
|
|||
4
pom.xml
4
pom.xml
|
|
@ -965,15 +965,15 @@
|
|||
<plugin>
|
||||
<groupId>de.thetaphi</groupId>
|
||||
<artifactId>forbiddenapis</artifactId>
|
||||
<version>2.0</version>
|
||||
<version>2.1</version>
|
||||
<configuration>
|
||||
<targetVersion>${java.version}</targetVersion>
|
||||
<internalRuntimeForbidden>true</internalRuntimeForbidden>
|
||||
<failOnUnsupportedJava>false</failOnUnsupportedJava>
|
||||
<bundledSignatures>
|
||||
<bundledSignature>jdk-unsafe</bundledSignature>
|
||||
<bundledSignature>jdk-deprecated</bundledSignature>
|
||||
<bundledSignature>jdk-system-out</bundledSignature>
|
||||
<bundledSignature>jdk-non-portable</bundledSignature>
|
||||
</bundledSignatures>
|
||||
<excludes>
|
||||
<!-- system-out is ok there, that is CLI -->
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@ import java.io.OutputStreamWriter;
|
|||
import java.io.PrintWriter;
|
||||
import java.io.StringWriter;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.util.Locale;
|
||||
import java.util.ResourceBundle;
|
||||
|
||||
import com.puppycrawl.tools.checkstyle.api.AuditEvent;
|
||||
|
|
@ -84,7 +85,7 @@ public class XMLLogger
|
|||
writer.println("<?xml version=\"1.0\" encoding=\"UTF-8\"?>");
|
||||
|
||||
final ResourceBundle compilationProperties =
|
||||
ResourceBundle.getBundle("checkstylecompilation");
|
||||
ResourceBundle.getBundle("checkstylecompilation", Locale.ROOT);
|
||||
final String version =
|
||||
compilationProperties.getString("checkstyle.compile.version");
|
||||
|
||||
|
|
|
|||
|
|
@ -283,7 +283,7 @@ public class CheckstyleAntTask extends Task {
|
|||
try {
|
||||
// output version info in debug mode
|
||||
final ResourceBundle compilationProperties = ResourceBundle
|
||||
.getBundle("checkstylecompilation");
|
||||
.getBundle("checkstylecompilation", Locale.ROOT);
|
||||
final String version = compilationProperties
|
||||
.getString("checkstyle.compile.version");
|
||||
final String compileTimestamp = compilationProperties
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@
|
|||
package com.puppycrawl.tools.checkstyle.utils;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
import java.util.Locale;
|
||||
import java.util.ResourceBundle;
|
||||
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
|
|
@ -150,7 +151,7 @@ public final class TokenUtils {
|
|||
|
||||
final String tokenTypes =
|
||||
"com.puppycrawl.tools.checkstyle.api.tokentypes";
|
||||
final ResourceBundle bundle = ResourceBundle.getBundle(tokenTypes);
|
||||
final ResourceBundle bundle = ResourceBundle.getBundle(tokenTypes, Locale.ROOT);
|
||||
return bundle.getString(name);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -235,7 +235,7 @@ public class MainTest {
|
|||
public void checkAssertion() throws IOException {
|
||||
final String expectedPath = getFilePath("InputMain.java");
|
||||
final ResourceBundle compilationProperties =
|
||||
ResourceBundle.getBundle("checkstylecompilation");
|
||||
ResourceBundle.getBundle("checkstylecompilation", Locale.ROOT);
|
||||
final String version = compilationProperties
|
||||
.getString("checkstyle.compile.version");
|
||||
assertEquals(String.format(Locale.ROOT,
|
||||
|
|
|
|||
Loading…
Reference in New Issue