Skip to content

Commit 50ae0c8

Browse files
authored
Use recommended project.getService & update sinceBuild to match intellij version (#1295)
Use recommended project.getService & update sinceBuild to match intellij version
1 parent 62b8894 commit 50ae0c8

3 files changed

Lines changed: 8 additions & 3 deletions

File tree

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
type: fix
2+
fix:
3+
description: Use recommended project.getService & update sinceBuild to match intellij
4+
version
5+
links:
6+
- https://github.com/palantir/palantir-java-format/pull/1295

idea-plugin/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ intellij {
2727

2828
patchPluginXml {
2929
pluginDescription = "Formats source code using the palantir-java-format tool."
30-
sinceBuild = '213' // TODO: test against this version of IntelliJ to ensure no regressions
30+
sinceBuild = '241' // TODO: keep the intellij version & sinceBuild in sync
3131
untilBuild = ''
3232
}
3333

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
package com.palantir.javaformat.intellij;
1818

1919
import com.intellij.openapi.components.PersistentStateComponent;
20-
import com.intellij.openapi.components.ServiceManager;
2120
import com.intellij.openapi.components.State;
2221
import com.intellij.openapi.components.Storage;
2322
import com.intellij.openapi.project.Project;
@@ -43,7 +42,7 @@ public class PalantirJavaFormatSettings implements PersistentStateComponent<Pala
4342
private State state = new State();
4443

4544
static PalantirJavaFormatSettings getInstance(Project project) {
46-
return ServiceManager.getService(project, PalantirJavaFormatSettings.class);
45+
return project.getService(PalantirJavaFormatSettings.class);
4746
}
4847

4948
@SuppressWarnings("for-rollout:SameNameButDifferent")

0 commit comments

Comments
 (0)