Skip to content

Commit 77b77f7

Browse files
committed
Missing from #1442 - NPE's in older adapters.
1 parent 53605f0 commit 77b77f7

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

lib/src/compatKtLint0Dot34Dot2/java/com/diffplug/spotless/glue/ktlint/compat/KtLintCompat0Dot34Dot2Adapter.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ public String format(final String text, Path path, final boolean isScript,
6262
userData,
6363
formatterCallback,
6464
isScript,
65-
editorConfigPath.toFile().getAbsolutePath(),
65+
editorConfigPath == null ? null : editorConfigPath.toFile().getAbsolutePath(),
6666
false));
6767
}
6868
}

lib/src/compatKtLint0Dot45Dot2/java/com/diffplug/spotless/glue/ktlint/compat/KtLintCompat0Dot45Dot2Adapter.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ public String format(final String text, Path path, final boolean isScript,
7777
userData,
7878
formatterCallback,
7979
isScript,
80-
editorConfigPath.toFile().getAbsolutePath(),
80+
editorConfigPath == null ? null : editorConfigPath.toFile().getAbsolutePath(),
8181
false,
8282
editorConfigOverride,
8383
false));

lib/src/compatKtLint0Dot46Dot0/java/com/diffplug/spotless/glue/ktlint/compat/KtLintCompat0Dot46Dot0Adapter.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ public String format(final String text, Path path, final boolean isScript,
7777
userData,
7878
formatterCallback,
7979
isScript,
80-
editorConfigPath.toFile().getAbsolutePath(),
80+
editorConfigPath == null ? null : editorConfigPath.toFile().getAbsolutePath(),
8181
false,
8282
editorConfigOverride,
8383
false));

0 commit comments

Comments
 (0)