Skip to content

Commit

Permalink
Replace deprecated APIs and update gradle build configuration (#108)
Browse files Browse the repository at this point in the history
  • Loading branch information
Ao-senXiong authored Aug 20, 2024
1 parent 3823d31 commit 089a7c1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,8 @@ task cloneAndBuildDependencies(type: Exec) {
tasks.withType(JavaCompile) { compilationTask ->
options.compilerArgs = [
'-implicit:class',
'-Werror',
'-Xlint:deprecation',
'-Awarns',
'-Xmaxwarns',
'10000',
Expand All @@ -125,6 +127,9 @@ tasks.withType(JavaCompile) { compilationTask ->
// Enable Error Prone
options.errorprone.enabled = !isJava8
options.errorprone.disableWarningsInGeneratedCode = true
options.errorprone.errorproneArgs = [
'-Xep:VoidUsed:OFF',
]
}

afterEvaluate {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ protected Slot getOrCreateDeclBound(AnnotatedDeclaredType type) {

@Override
public void handleBinaryTree(AnnotatedTypeMirror atm, BinaryTree binaryTree) {
if (atm.isAnnotatedInHierarchy(getVarAnnot())) {
if (atm.hasAnnotationInHierarchy(getVarAnnot())) {
// Happens for binary trees whose atm is implicitly immutable and already handled by
// PICOInferencePropagationTreeAnnotator
return;
Expand All @@ -135,7 +135,7 @@ public Void visitBinary(BinaryTree node, AnnotatedTypeMirror type) {
public Void visitTypeCast(TypeCastTree node, AnnotatedTypeMirror type) {
applyBottomIfImplicitlyBottom(
type); // Must run before calling super method to respect existing annotation
if (type.isAnnotatedInHierarchy(ANY)) {
if (type.hasAnnotationInHierarchy(ANY)) {
// VarAnnot is guarenteed to not exist on type, because PropagationTreeAnnotator has
// the highest previledge
// So VarAnnot hasn't been inserted to cast type yet.
Expand Down

0 comments on commit 089a7c1

Please sign in to comment.