Skip to content

Commit

Permalink
Excavator: Upgrades Baseline to the latest version
Browse files Browse the repository at this point in the history
  • Loading branch information
svc-excavator-bot committed Sep 4, 2019
1 parent ab5a0a2 commit 699a940
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
import com.google.errorprone.matchers.Matcher;
import com.google.errorprone.matchers.Matchers;
import com.google.errorprone.util.ASTHelpers;
import com.palantir.logsafe.exceptions.SafeIllegalStateException;
import com.sun.source.tree.ExpressionTree;
import com.sun.source.tree.NewClassTree;
import java.io.IOException;
Expand Down Expand Up @@ -98,6 +99,6 @@ public Description matchNewClass(NewClassTree tree, VisitorState state) {
.build())
.build())
.findAny()
.orElseThrow(() -> new IllegalStateException("Expected to match a known replaceable exception type"));
.orElseThrow(() -> new SafeIllegalStateException("Expected to match a known replaceable exception type"));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
package com.palantir.baseline.refaster;

import com.google.auto.service.AutoService;
import com.google.common.base.Preconditions;
import com.sun.source.util.JavacTask;
import com.sun.source.util.Plugin;
import com.sun.tools.javac.api.BasicJavacTask;
Expand All @@ -40,11 +39,11 @@ public String getName() {
public void init(JavacTask task, String... args) {
List<String> listArgs = Arrays.asList(args);
int outIndex = listArgs.indexOf("--out");
Preconditions.checkArgument(outIndex != -1, "No --out specified");
Preconditions.checkArgument(listArgs.size() > outIndex, "No value passed for --out");
com.palantir.logsafe.Preconditions.checkArgument(outIndex != -1, "No --out specified");
com.palantir.logsafe.Preconditions.checkArgument(listArgs.size() > outIndex, "No value passed for --out");
String path = listArgs.get(outIndex + 1);

Preconditions.checkArgument(task instanceof BasicJavacTask, "JavacTask not instance of BasicJavacTask");
com.palantir.logsafe.Preconditions.checkArgument(task instanceof BasicJavacTask, "JavacTask not instance of BasicJavacTask");
task.addTaskListener(new BaselineRefasterCompilerAnalyzer(
((BasicJavacTask) task).getContext(), FileSystems.getDefault().getPath(path)));
}
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ buildscript {
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.4'
classpath 'com.netflix.nebula:nebula-publishing-plugin:13.2.0'
classpath 'com.netflix.nebula:gradle-info-plugin:5.0.3'
classpath 'com.palantir.baseline:gradle-baseline-java:1.17.2'
classpath 'com.palantir.baseline:gradle-baseline-java:1.19.0'
}
}

Expand Down

0 comments on commit 699a940

Please sign in to comment.