@@ -97,13 +97,13 @@ private FileSignature(final List<File> files) throws IOException {
97
97
}
98
98
99
99
/** A view of `FileSignature` which can be safely roundtripped. */
100
- public static class RoundTrippable implements Serializable {
100
+ public static class Promised implements Serializable {
101
101
private static final long serialVersionUID = 1L ;
102
102
private final List <File > files ;
103
103
@ SuppressFBWarnings ("SE_TRANSIENT_FIELD_NOT_RESTORED" )
104
104
private transient @ Nullable FileSignature cached ;
105
105
106
- private RoundTrippable (List <File > files , FileSignature cached ) {
106
+ private Promised (List <File > files , FileSignature cached ) {
107
107
this .files = files ;
108
108
this .cached = cached ;
109
109
}
@@ -117,19 +117,23 @@ public FileSignature stripAbsolutePaths() throws IOException {
117
117
}
118
118
}
119
119
120
- public RoundTrippable roundTrippable ( ) {
121
- return new RoundTrippable ( files , this );
120
+ public static Promised promise ( Iterable < File > files ) {
121
+ return new Promised ( MoreIterables . toNullHostileList ( files ), null );
122
122
}
123
123
124
- public static @ Nullable RoundTrippable roundTrippableNullable (@ Nullable FileSignature signature ) {
124
+ public Promised roundTrippable () {
125
+ return new Promised (files , this );
126
+ }
127
+
128
+ public static @ Nullable Promised roundTrippableNullable (@ Nullable FileSignature signature ) {
125
129
if (signature != null ) {
126
130
return signature .roundTrippable ();
127
131
} else {
128
132
return null ;
129
133
}
130
134
}
131
135
132
- public static @ Nullable FileSignature stripAbsolutePathsNullable (@ Nullable RoundTrippable roundTrippable ) throws IOException {
136
+ public static @ Nullable FileSignature stripAbsolutePathsNullable (@ Nullable Promised roundTrippable ) throws IOException {
133
137
if (roundTrippable != null ) {
134
138
return roundTrippable .stripAbsolutePaths ();
135
139
} else {
0 commit comments