Skip to content

Commit

Permalink
Upgrade Error Prone (#2808)
Browse files Browse the repository at this point in the history
  • Loading branch information
pkoenig10 authored May 30, 2024
1 parent 9b4d816 commit ff8ac41
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 16 deletions.
4 changes: 1 addition & 3 deletions baseline-error-prone/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import net.ltgt.gradle.errorprone.CheckSeverity

apply plugin: 'java-library'
apply plugin: 'com.palantir.external-publish-jar'

Expand Down Expand Up @@ -53,7 +51,7 @@ dependencies {
tasks.checkJUnitDependencies.enabled = false
tasks.withType(JavaCompile) {
options.errorprone {
check("StrictUnusedVariable", CheckSeverity.OFF)
disable('StrictUnusedVariable')
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ public Void visitInstanceOf(InstanceOfTree instanceOfNode, Void ignored) {

@Override
public Void visitParenthesized(ParenthesizedTree node, Void ignored) {
return node.getExpression().accept(this, ignored);
return node.getExpression().accept(this, null);
}
},
null);
Expand Down Expand Up @@ -286,7 +286,7 @@ public Void visitAssignment(AssignmentTree node, Void state) {
&& ((IdentifierTree) expression).getName().contentEquals(exceptionName)) {
variableWasAssigned = true;
}
return super.visitAssignment(node, state);
return super.visitAssignment(node, null);
}

// Avoid searching outside the current scope
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ public Boolean visitClass(ClassTree classTree, Void attachment) {
ASTHelpers.getType(tree), ASTHelpers.getType(extendsClause), state)) {
return true;
}
return super.visitClass(classTree, attachment);
return super.visitClass(classTree, null);
}

@Override
Expand All @@ -129,7 +129,7 @@ public Boolean visitNewClass(NewClassTree newClassTree, Void attachment) {
state)) {
return true;
}
return super.visitNewClass(newClassTree, attachment);
return super.visitNewClass(newClassTree, null);
}
},
null);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ public Boolean visitThrow(ThrowTree node, Void state) {
public Boolean visitBlock(BlockTree node, Void state) {
// Only validate the first statement for the most common case to avoid unnecessary complexity
StatementTree firstStatement = Iterables.getFirst(node.getStatements(), null);
return firstStatement != null && firstStatement.accept(this, state);
return firstStatement != null && firstStatement.accept(this, null);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -801,7 +801,7 @@ public Void visitLambdaExpression(LambdaExpressionTree node, Void unused) {

@Override
public Void visitMethod(MethodTree tree, Void unused) {
return isSuppressed(tree, state) ? null : super.visitMethod(tree, unused);
return isSuppressed(tree, state) ? null : super.visitMethod(tree, null);
}
}

Expand Down
12 changes: 6 additions & 6 deletions versions.lock
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ com.google.auto.service:auto-service:1.1.1 (1 constraints: 0505f435)
com.google.auto.service:auto-service-annotations:1.1.1 (2 constraints: 8a20341c)
com.google.auto.value:auto-value-annotations:1.10.4 (3 constraints: ac2df2f5)
com.google.code.findbugs:jsr305:3.0.2 (6 constraints: 66626968)
com.google.errorprone:error_prone_annotation:2.26.1 (3 constraints: cd3890ef)
com.google.errorprone:error_prone_annotations:2.26.1 (13 constraints: 6ccd7739)
com.google.errorprone:error_prone_check_api:2.26.1 (2 constraints: b825ceff)
com.google.errorprone:error_prone_core:2.26.1 (1 constraints: 3d05463b)
com.google.errorprone:error_prone_type_annotations:2.26.1 (1 constraints: 281159c9)
com.google.errorprone:error_prone_annotation:2.27.1 (3 constraints: d03839f0)
com.google.errorprone:error_prone_annotations:2.27.1 (13 constraints: 6fcda93e)
com.google.errorprone:error_prone_check_api:2.27.1 (2 constraints: ba251b00)
com.google.errorprone:error_prone_core:2.27.1 (1 constraints: 3e05493b)
com.google.errorprone:error_prone_type_annotations:2.27.1 (1 constraints: 29115cc9)
com.google.guava:failureaccess:1.0.2 (2 constraints: f2152a13)
com.google.guava:guava:33.2.0-jre (16 constraints: 82042411)
com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava (1 constraints: bd17c918)
Expand Down Expand Up @@ -84,7 +84,7 @@ com.fasterxml.jackson.core:jackson-databind:2.16.1 (5 constraints: b34a3862)
com.fasterxml.jackson.module:jackson-module-afterburner:2.16.1 (1 constraints: 3c05423b)
com.github.stefanbirkner:system-rules:1.19.0 (1 constraints: 3d05443b)
com.google.auto.value:auto-value:1.10 (1 constraints: e711f8e8)
com.google.errorprone:error_prone_test_helpers:2.26.1 (1 constraints: 3d05463b)
com.google.errorprone:error_prone_test_helpers:2.27.1 (1 constraints: 3e05493b)
com.google.googlejavaformat:google-java-format:1.19.1 (1 constraints: 9214b075)
com.google.jimfs:jimfs:1.3.0 (1 constraints: 5a141061)
com.google.testing.compile:compile-testing:0.21.0 (1 constraints: 89149575)
Expand Down
2 changes: 1 addition & 1 deletion versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ org.jooq:jooq = 3.19.8
org.slf4j:* = 1.7.36
org.immutables:* = 2.10.1
org.ow2.asm:asm = 9.7
com.google.errorprone:error_prone_* = 2.26.1
com.google.errorprone:error_prone_* = 2.27.1
com.googlecode.java-diff-utils:diffutils = 1.3.0
com.puppycrawl.tools:checkstyle = 10.16.0
com.palantir.gradle.utils:* = 0.1.0
Expand Down

0 comments on commit ff8ac41

Please sign in to comment.