20
20
import java .util .Objects ;
21
21
22
22
import edu .umd .cs .findbugs .annotations .Nullable ;
23
+ import edu .umd .cs .findbugs .annotations .SuppressFBWarnings ;
23
24
24
25
final class FormatterStepSerializationRoundtrip <RoundtripState extends Serializable , EqualityState extends Serializable > extends FormatterStepEqualityOnStateSerialization <EqualityState > {
25
26
private static final long serialVersionUID = 1L ;
26
27
private final String name ;
28
+ @ SuppressFBWarnings (value = "SE_TRANSIENT_FIELD_NOT_RESTORED" , justification = "HackClone" )
27
29
private final transient ThrowingEx .Supplier <RoundtripState > initializer ;
28
30
private @ Nullable RoundtripState roundtripStateInternal ;
29
31
private @ Nullable EqualityState equalityStateInternal ;
@@ -74,6 +76,8 @@ protected FormatterFunc stateToFormatter(EqualityState equalityState) throws Exc
74
76
* It works in conjunction with ConfigurationCacheHackList to allow Spotless to work with all of Gradle's cache systems.
75
77
*/
76
78
static class HackClone <RoundtripState extends Serializable , EqualityState extends Serializable > implements Serializable {
79
+ private static final long serialVersionUID = 1L ;
80
+ @ SuppressFBWarnings (value = "SE_TRANSIENT_FIELD_NOT_RESTORED" , justification = "HackClone" )
77
81
transient FormatterStepSerializationRoundtrip <?, ?> original ;
78
82
boolean optimizeForEquality ;
79
83
@ Nullable
@@ -84,6 +88,7 @@ static class HackClone<RoundtripState extends Serializable, EqualityState extend
84
88
this .optimizeForEquality = optimizeForEquality ;
85
89
}
86
90
91
+ @ SuppressFBWarnings (value = "NP_NONNULL_PARAM_VIOLATION" , justification = "HackClone" )
87
92
private void writeObject (java .io .ObjectOutputStream out ) throws IOException {
88
93
if (cleaned == null ) {
89
94
cleaned = new FormatterStepSerializationRoundtrip (original .name , null , original .equalityStateExtractor , original .equalityStateToFormatter );
0 commit comments