11/*
2- * Copyright 2016-2024 DiffPlug
2+ * Copyright 2016-2025 DiffPlug
33 *
44 * Licensed under the Apache License, Version 2.0 (the "License");
55 * you may not use this file except in compliance with the License.
2222import com .diffplug .spotless .FormatterStep ;
2323import com .diffplug .spotless .Provisioner ;
2424
25- /** Uses google -java-format or cleanthat.UnnecessaryImport, but only to remove unused imports. */
25+ /** Uses palantir -java-format or cleanthat.UnnecessaryImport, but only to remove unused imports. */
2626public class RemoveUnusedImportsStep implements Serializable {
2727 private static final long serialVersionUID = 1L ;
2828 static final String NAME = "removeUnusedImports" ;
2929
30- static final String GJF = "google -java-format" ;
30+ static final String DEFAULT_FORMATTER = "palantir -java-format" ;
3131 static final String CLEANTHAT = "cleanthat-javaparser-unnecessaryimport" ;
3232
3333 // https://github.com/solven-eu/cleanthat/blob/master/java/src/main/java/eu/solven/cleanthat/engine/java/refactorer/mutators/UnnecessaryImport.java
@@ -37,18 +37,17 @@ public class RemoveUnusedImportsStep implements Serializable {
3737 private RemoveUnusedImportsStep () {}
3838
3939 public static String defaultFormatter () {
40- return GJF ;
40+ return DEFAULT_FORMATTER ;
4141 }
4242
4343 public static FormatterStep create (Provisioner provisioner ) {
44- // The default importRemover is GJF
45- return create (GJF , provisioner );
44+ return create (DEFAULT_FORMATTER , provisioner );
4645 }
4746
4847 public static FormatterStep create (String unusedImportRemover , Provisioner provisioner ) {
4948 Objects .requireNonNull (provisioner , "provisioner" );
5049 switch (unusedImportRemover ) {
51- case GJF :
50+ case DEFAULT_FORMATTER :
5251 return GoogleJavaFormatStep .createRemoveUnusedImportsOnly (provisioner );
5352 case CLEANTHAT :
5453 return CleanthatJavaStep .createWithStepName (NAME , CleanthatJavaStep .defaultGroupArtifact (), CleanthatJavaStep .defaultVersion (), "99.9" , List .of (CLEANTHAT_MUTATOR ), List .of (), false , provisioner );
0 commit comments