File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed
lib/src/main/java/com/diffplug/spotless/yaml Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change 21
21
22
22
import com .diffplug .spotless .FormatterStep ;
23
23
24
+ /**
25
+ * This step is a flag which marks that `ConfigurationCacheHackList` should
26
+ * serialize each item individually into `byte[]` array, rather than using normal
27
+ * serialization.
28
+ *
29
+ * The reason to use this is if you are using `toggleOffOn` *and* two kinds of
30
+ * google-java-format (e.g. one for format and the other for imports), then
31
+ * problems with Java's handling of object graphs will cause your up-to-date checks
32
+ * to always fail. `CombinedJavaFormatStepTest` recreates this situation. By adding
33
+ * this step, it will trigger this workaround which fixes the up-to-dateness bug.
34
+ *
35
+ * But, turning it on will break all `custom` steps that use Groovy closures. So
36
+ * by default you get regular serialization. If you're using `toggleOffOn` and having
37
+ * problems with up-to-dateness, then adding this step can be a workaround.
38
+ */
24
39
public class SerializeToByteArrayHack implements FormatterStep {
25
40
private static final long serialVersionUID = 8071047581828362545L ;
26
41
You can’t perform that action at this time.
0 commit comments