|
22 | 22 | import java.io.FileWriter; |
23 | 23 | import java.io.IOException; |
24 | 24 | import java.nio.file.Files; |
| 25 | +import java.util.Locale; |
25 | 26 |
|
26 | 27 | /** |
27 | 28 | * Abstract class responsible for installing a Git pre-push hook in a repository. |
@@ -225,7 +226,7 @@ private String executorPath(Executor executor) { |
225 | 226 | } |
226 | 227 |
|
227 | 228 | 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); |
229 | 230 |
|
230 | 231 | return executor.global; |
231 | 232 | } |
@@ -258,7 +259,7 @@ private File executorWrapperFile(Executor executor) { |
258 | 259 | * @return true if the current OS is Windows, false otherwise |
259 | 260 | */ |
260 | 261 | private boolean isWindows() { |
261 | | - return System.getProperty("os.name").toLowerCase().startsWith("win"); |
| 262 | + return System.getProperty("os.name").toLowerCase(Locale.ROOT).startsWith("win"); |
262 | 263 | } |
263 | 264 |
|
264 | 265 | /** |
@@ -296,8 +297,7 @@ private void writeFile(File file, String content, boolean append) throws IOExcep |
296 | 297 | } |
297 | 298 |
|
298 | 299 | public enum Executor { |
299 | | - GRADLE("gradlew", "gradle"), |
300 | | - MAVEN("mvnw", "mvn"), ; |
| 300 | + GRADLE("gradlew", "gradle"), MAVEN("mvnw", "mvn"),; |
301 | 301 |
|
302 | 302 | public final String wrapper; |
303 | 303 | public final String global; |
|
0 commit comments