Skip to content

Commit c3252a2

Browse files
committed
Fixup the writeObject for the new HackClone situation.
1 parent f524e9b commit c3252a2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ protected FormatterFunc stateToFormatter(EqualityState equalityState) throws Exc
6565
}
6666

6767
private void writeObject(java.io.ObjectOutputStream out) throws IOException {
68-
if (roundtripStateInternal == null) {
68+
if (initializer != null && roundtripStateInternal == null) {
6969
roundtripStateInternal = ThrowingEx.get(this::roundtripStateSupplier);
7070
}
7171
out.defaultWriteObject();

0 commit comments

Comments
 (0)