Skip to content

Commit 1042742

Browse files
lazer-devntwigg
authored andcommitted
spotlessApply
1 parent 4cf8137 commit 1042742

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lib/src/main/java/com/diffplug/spotless/GitPrePushHookInstaller.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
import java.io.FileWriter;
2323
import java.io.IOException;
2424
import java.nio.file.Files;
25+
import java.util.Locale;
2526

2627
/**
2728
* Abstract class responsible for installing a Git pre-push hook in a repository.
@@ -225,7 +226,7 @@ private String executorPath(Executor executor) {
225226
}
226227

227228
logger.info("Local %s wrapper (%s) not found, falling back to global command '%s'",
228-
executor.name().toLowerCase(), executor.wrapper, executor.global);
229+
executor.name().toLowerCase(Locale.ROOT), executor.wrapper, executor.global);
229230

230231
return executor.global;
231232
}
@@ -258,7 +259,7 @@ private File executorWrapperFile(Executor executor) {
258259
* @return true if the current OS is Windows, false otherwise
259260
*/
260261
private boolean isWindows() {
261-
return System.getProperty("os.name").toLowerCase().startsWith("win");
262+
return System.getProperty("os.name").toLowerCase(Locale.ROOT).startsWith("win");
262263
}
263264

264265
/**
@@ -296,8 +297,7 @@ private void writeFile(File file, String content, boolean append) throws IOExcep
296297
}
297298

298299
public enum Executor {
299-
GRADLE("gradlew", "gradle"),
300-
MAVEN("mvnw", "mvn"), ;
300+
GRADLE("gradlew", "gradle"), MAVEN("mvnw", "mvn"),;
301301

302302
public final String wrapper;
303303
public final String global;

0 commit comments

Comments
 (0)