Skip to content

Commit 6ea3018

Browse files
Excavator: Upgrades Baseline to the latest version (#1321)
1 parent b7b5995 commit 6ea3018

File tree

40 files changed

+36
-138
lines changed

40 files changed

+36
-138
lines changed

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ buildscript {
77
dependencies {
88
classpath 'com.palantir.jakartapackagealignment:jakarta-package-alignment:0.6.0'
99
classpath 'com.gradle.publish:plugin-publish-plugin:1.3.1'
10-
classpath 'com.palantir.baseline:gradle-baseline-java:6.34.0'
10+
classpath 'com.palantir.baseline:gradle-baseline-java:6.35.0'
1111
classpath 'com.palantir.gradle.consistentversions:gradle-consistent-versions:2.34.0'
1212
classpath 'com.palantir.gradle.externalpublish:gradle-external-publish-plugin:1.19.0'
1313
classpath 'com.palantir.gradle.failure-reports:gradle-failure-reports:1.14.0'

eclipse_plugin/src/main/java/com/palantir/javaformat/java/PalantirJavaFormatter.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,6 @@ private TextEdit formatInternal(int kind, String source, IRegion[] regions, int
8383
default:
8484
throw new IllegalArgumentException(String.format("Unknown snippet kind: %d", kind));
8585
}
86-
@SuppressWarnings("for-rollout:PreferredInterfaceType")
8786
List<Replacement> replacements = new SnippetFormatter()
8887
.format(snippetKind, source, rangesFromRegions(regions), initialIndent, includeComments);
8988
if (idempotent(source, regions, replacements)) {

gradle-palantir-java-format/src/main/java/com/palantir/javaformat/gradle/ExecutableTransform.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ public abstract class ExecutableTransform implements TransformAction<TransformPa
4747
@InputArtifact
4848
public abstract Provider<FileSystemLocation> getInputArtifact();
4949

50-
@SuppressWarnings("for-rollout:ThrowSpecificExceptions")
5150
@Override
5251
public void transform(TransformOutputs outputs) {
5352
File inputFile = getInputArtifact().get().getAsFile();
@@ -60,7 +59,6 @@ public void transform(TransformOutputs outputs) {
6059
}
6160
}
6261

63-
@SuppressWarnings("for-rollout:ThrowSpecificExceptions")
6462
private static void makeFileExecutable(Path pathToExe) {
6563
try {
6664
Set<PosixFilePermission> existingPermissions = Files.getPosixFilePermissions(pathToExe);

gradle-palantir-java-format/src/main/java/com/palantir/javaformat/gradle/FormatDiff.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,6 @@ private static RangeSet<Integer> lineRangesToCharRanges(String input, RangeSet<I
163163
Iterators.addAll(lines, new LineOffsetIterator(input));
164164
lines.add(input.length() + 1);
165165

166-
@SuppressWarnings("for-rollout:UnnecessaryFinal")
167166
final RangeSet<Integer> characterRanges = TreeRangeSet.create();
168167
for (Range<Integer> lineRange :
169168
lineRanges.subRangeSet(Range.closedOpen(0, lines.size() - 1)).asRanges()) {

gradle-palantir-java-format/src/main/java/com/palantir/javaformat/gradle/JavaFormatExtension.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ public FormatterService serviceLoad() {
4141

4242
@SuppressWarnings("for-rollout:NullAway")
4343
private FormatterService serviceLoadInternal() {
44-
@SuppressWarnings("for-rollout:ThrowSpecificExceptions")
4544
URL[] jarUris = configuration.getFiles().stream()
4645
.map(file -> {
4746
try {

gradle-palantir-java-format/src/main/java/com/palantir/javaformat/gradle/spotless/PalantirJavaFormatStep.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,6 @@ FormatterFunc createFormat() {
7373
}
7474
}
7575

76-
@SuppressWarnings("for-rollout:ThrowSpecificExceptions")
7776
private static void ensureImplementationNotDirectlyLoadable() {
7877
try {
7978
PalantirJavaFormatStep.class.getClassLoader().loadClass(IMPL_CLASS);

idea-plugin/src/main/java/com/palantir/javaformat/intellij/FormatterProvider.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,6 @@ private static Optional<Sdk> getProjectJdk(Project project) {
196196
return Optional.ofNullable(ProjectRootManager.getInstance(project).getProjectSdk());
197197
}
198198

199-
@SuppressWarnings("for-rollout:ThrowSpecificExceptions")
200199
private static URL[] toUrlsUnchecked(List<Path> paths) {
201200
return paths.stream()
202201
.map(path -> {
@@ -209,7 +208,6 @@ private static URL[] toUrlsUnchecked(List<Path> paths) {
209208
.toArray(URL[]::new);
210209
}
211210

212-
@SuppressWarnings("for-rollout:ThrowSpecificExceptions")
213211
private static List<Path> listDirAsUrlsUnchecked(Path dir) {
214212
try (Stream<Path> list = Files.list(dir)) {
215213
return list.collect(Collectors.toList());

idea-plugin/src/main/java/com/palantir/javaformat/intellij/PalantirJavaFormatFormattingService.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,6 @@ public void run() {
101101
request.getDocumentText().length(),
102102
request.getFormattingRanges()));
103103
}
104-
@SuppressWarnings("for-rollout:PreferredInterfaceType")
105104
List<Replacement> replacements =
106105
formatterService.get().getFormatReplacements(request.getDocumentText(), toRanges(request));
107106
if (logger.isDebugEnabled()) {
@@ -141,7 +140,6 @@ public static String applyReplacements(String input, Collection<Replacement> rep
141140
return writer.toString();
142141
}
143142

144-
@SuppressWarnings("for-rollout:PreferredInterfaceType")
145143
private static Collection<Range<Integer>> toRanges(AsyncFormattingRequest request) {
146144
if (isWholeFile(request)) {
147145
// The IDE sometimes passes invalid ranges when the file is unsaved before invoking the

idea-plugin/src/main/java/com/palantir/javaformat/intellij/PalantirJavaFormatSettings.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,6 @@ Optional<String> getImplementationVersion() {
113113
return Optional.ofNullable(FormatterProvider.getPluginDescriptor().getVersion());
114114
}
115115

116-
@SuppressWarnings("for-rollout:ThrowSpecificExceptions")
117116
Optional<String> computeFormatterVersion() {
118117
return getImplementationClassPath().map(classpath -> classpath.stream()
119118
.flatMap(uri -> {

idea-plugin/src/main/java/com/palantir/javaformat/intellij/UiFormatterStyle.java

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,9 @@ enum UiFormatterStyle {
2828

2929
private final String description;
3030

31-
@SuppressWarnings("for-rollout:DifferentNameButSame")
3231
private final JavaFormatterOptions.Style style;
3332

34-
UiFormatterStyle(
35-
String description,
36-
@SuppressWarnings("for-rollout:DifferentNameButSame") JavaFormatterOptions.Style style) {
33+
UiFormatterStyle(String description, JavaFormatterOptions.Style style) {
3734
this.description = description;
3835
this.style = style;
3936
}
@@ -43,13 +40,11 @@ public String toString() {
4340
return description;
4441
}
4542

46-
@SuppressWarnings("for-rollout:DifferentNameButSame")
4743
public JavaFormatterOptions.Style convert() {
4844
return style;
4945
}
5046

51-
static UiFormatterStyle convert(
52-
@SuppressWarnings("for-rollout:DifferentNameButSame") JavaFormatterOptions.Style style) {
47+
static UiFormatterStyle convert(JavaFormatterOptions.Style style) {
5348
return Arrays.stream(UiFormatterStyle.values())
5449
.filter(value -> Objects.equals(value.style, style))
5550
.findFirst()

0 commit comments

Comments
 (0)