29
29
*/
30
30
public final class RF2ReleaseSpecification {
31
31
32
- private final String initial ;
32
+
33
+ private final String initial ;
33
34
private final String product ;
34
35
private final String format ;
35
36
private final String status ;
@@ -39,6 +40,7 @@ public final class RF2ReleaseSpecification {
39
40
private final String time ;
40
41
private final String [] contentSubTypes ;
41
42
private final RF2ReleaseContent content ;
43
+ private final LocalDateTime now = LocalDateTime .now (ZoneId .of ("UTC" ));
42
44
43
45
@ JsonCreator
44
46
public RF2ReleaseSpecification (
@@ -58,9 +60,8 @@ public RF2ReleaseSpecification(
58
60
this .status = status ;
59
61
this .country = country ;
60
62
this .namespace = namespace ;
61
- final LocalDateTime now = LocalDateTime .now (ZoneId .of ("UTC" ));
62
- this .date = Strings .isNullOrEmpty (date ) ? now .format (DateTimeFormatter .BASIC_ISO_DATE ) : date ;
63
- this .time = Strings .isNullOrEmpty (time ) ? now .format (DateTimeFormatter .ofPattern ("HHmmss" )) : time ;
63
+ this .date = date ;
64
+ this .time = time ;
64
65
this .contentSubTypes = contentSubTypes ;
65
66
this .content = content ;
66
67
}
@@ -90,11 +91,11 @@ public String getNamespace() {
90
91
}
91
92
92
93
public String getDate () {
93
- return date ;
94
+ return Strings . isNullOrEmpty ( date ) ? now . format ( DateTimeFormatter . BASIC_ISO_DATE ) : date ;
94
95
}
95
96
96
97
public String getTime () {
97
- return time ;
98
+ return Strings . isNullOrEmpty ( time ) ? now . format ( DateTimeFormatter . ofPattern ( "HHmmss" )) : time ;
98
99
}
99
100
100
101
@ JsonProperty ("contentSubType" )
0 commit comments