Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Excavator: Upgrades Baseline to the latest version #509

Merged
merged 1 commit into from
Sep 10, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 9 additions & 14 deletions .baseline/checkstyle/checkstyle.xml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,9 @@
<property name="tokens" value="VARIABLE_DEF"/>
<property name="allowSamelineMultipleAnnotations" value="true"/>
</module>
<module name="AnnotationUseStyle"/> <!-- Java Style Guide: Annotations -->
<module name="AnnotationUseStyle"> <!-- Java Style Guide: Annotations -->
<property name="trailingArrayComma" value="ignore"/>
</module>
<module name="ArrayTypeStyle"/> <!-- Java Style Guide: No C-style array declarations -->
<module name="AvoidEscapedUnicodeCharacters"> <!-- Java Style Guide: Non-ASCII characters -->
<property name="allowEscapesForControlCharacters" value="true"/>
Expand All @@ -81,14 +83,7 @@
</module>
<module name="AvoidStarImport"/> <!-- Java Style Guide: No wildcard imports -->
<module name="AvoidStaticImport"> <!-- Java Style Guide: No static imports -->
<property name="excludes" value="
com.google.common.base.Preconditions.*,
com.palantir.logsafe.Preconditions.*,
java.util.Collections.*,
java.util.stream.Collectors.*,
org.apache.commons.lang3.Validate.*,
org.assertj.core.api.Assertions.*,
org.mockito.Mockito.*"/>
<property name="excludes" value="com.google.common.base.Preconditions.*, com.palantir.logsafe.Preconditions.*, java.util.Collections.*, java.util.stream.Collectors.*, org.apache.commons.lang3.Validate.*, org.assertj.core.api.Assertions.*, org.mockito.Mockito.*"/>
</module>
<module name="ClassTypeParameterName"> <!-- Java Style Guide: Type variable names -->
<property name="format" value="(^[A-Z][0-9]?)$|([A-Z][a-zA-Z0-9]*[T]$)"/>
Expand Down Expand Up @@ -138,12 +133,12 @@
<module name="IllegalImport"> <!-- Java Coding Guidelines: Import the canonical package -->
<property name="id" value="BanShadedClasses"/>
<property name="illegalPkgs" value=".*\.(repackaged|shaded|thirdparty)"/>
<property name="regexp" value="true" />
<property name="regexp" value="true"/>
<message key="import.illegal" value="Must not import repackaged classes."/>
</module>
<module name="IllegalImport">
<property name="illegalPkgs" value="^org\.gradle\.(internal|.*\.internal)"/>
<property name="regexp" value="true" />
<property name="regexp" value="true"/>
<message key="import.illegal" value="Do not rely on gradle internal classes as these may change in minor releases - use org.gradle.api versions instead."/>
</module>
<module name="IllegalImport">
Expand Down Expand Up @@ -358,7 +353,7 @@
</module>
<module name="RegexpSinglelineJava">
<property name="format" value="\bCharset.defaultCharset\("/>
<property name="message" value="Use explicit charset (e.g. StandardCharsets.UTF-8) instead of default."/>
<property name="message" value="Use explicit charset (e.g. StandardCharsets.UTF_8) instead of default."/>
</module>
<module name="RegexpSinglelineJava">
<property name="format" value="\bIOUtils\.toString\("/>
Expand Down Expand Up @@ -397,7 +392,7 @@
<module name="SuppressWarnings">
<property name="format" value="serial"/>
</module>
<module name="SuppressWarningsHolder" /> <!-- Required for SuppressWarningsFilter -->
<module name="SuppressWarningsHolder"/> <!-- Required for SuppressWarningsFilter -->
<module name="TypeName"> <!-- Java Style Guide: Class names -->
<message key="name.invalidPattern" value="Type name ''{0}'' must match pattern ''{1}''."/>
</module>
Expand Down Expand Up @@ -430,7 +425,7 @@
<property name="ignoredAnnotations" value="ParameterizedTest, Test, Before, BeforeEach, After, AfterEach, BeforeClass, BeforeAll, AfterClass, AfterAll"/>
</module>
<module name="JavadocMethod"> <!-- Java Style Guide: Where Javadoc is used -->
<property name="scope" value="public"/>
<property name="accessModifiers" value="public"/>
<property name="allowMissingParamTags" value="true"/>
<property name="allowMissingReturnTag" value="true"/>
<property name="allowedAnnotations" value="Override, Test"/>
Expand Down
12 changes: 12 additions & 0 deletions .baseline/idea/intellij-java-palantir-style.xml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,18 @@
<package name="" withSubpackages="true" static="false" />
</value>
</option>
<DO_NOT_IMPORT_INNER>
<CLASS name="Builder" />
<CLASS name="Callback" />
<CLASS name="Class" />
<CLASS name="Entry" />
<CLASS name="Enum" />
<CLASS name="Factory" />
<CLASS name="Type" />
<CLASS name="Key" />
<CLASS name="Id" />
<CLASS name="Provider" />
</DO_NOT_IMPORT_INNER>
</GroovyCodeStyleSettings>
<option name="JD_ALIGN_EXCEPTION_COMMENTS" value="false" />
<option name="JD_ALIGN_PARAM_COMMENTS" value="false" />
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ buildscript {
dependencies {
classpath 'com.palantir.gradle.externalpublish:gradle-external-publish-plugin:1.4.0'
classpath 'com.github.jengelman.gradle.plugins:shadow:6.1.0'
classpath 'com.palantir.baseline:gradle-baseline-java:3.43.0'
classpath 'com.palantir.baseline:gradle-baseline-java:4.25.0'
classpath 'com.palantir.gradle.consistentversions:gradle-consistent-versions:2.0.0'
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ public long getPos() throws IOException {
}

@Override
public int read(byte[] bytes, int offset, int length) throws IOException {
return super.read(bytes, offset, length);
public int read(byte[] bytes, int off, int len) throws IOException {
return super.read(bytes, off, len);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
*/
public final class ChainedKeyStorageStrategy implements KeyStorageStrategy {

private static final Logger logger = LoggerFactory.getLogger(ChainedKeyStorageStrategy.class);
private static final Logger log = LoggerFactory.getLogger(ChainedKeyStorageStrategy.class);

private final List<KeyStorageStrategy> strategies;

Expand Down Expand Up @@ -60,7 +60,10 @@ public KeyMaterial get(String fileKey) {
return strategy.get(fileKey);
} catch (Exception e) {
suppressedExceptions.add(e);
logger.info("Failed to get key material using {}", strategy.getClass().getCanonicalName(), e);
log.info(
"Failed to get key material using {}",
strategy.getClass().getCanonicalName(),
e);
}
}
RuntimeException toThrow = new RuntimeException(String.format(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
import org.immutables.value.Value;

// This class is not Jackson serializable due to SecretKey
// Automatically suppressed to unblock enforcement in new code
@SuppressWarnings("ImmutablesStyle")
@Value.Immutable
@Value.Style(visibility = Value.Style.ImplementationVisibility.PACKAGE, jdkOnly = true)
public abstract class KeyMaterial {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
*/
public abstract class DelegatingFileSystem extends FilterFileSystem {

public DelegatingFileSystem(FileSystem delegate) {
protected DelegatingFileSystem(FileSystem delegate) {
super(delegate);
try {
super.initialize(delegate.getUri(), delegate.getConf());
Expand Down