39
39
@ ConfigurationProperties (prefix = "spring.modulith.moments" )
40
40
public class MomentsProperties {
41
41
42
- public static final MomentsProperties DEFAULTS = new MomentsProperties (null , null , null , ( Month ) null , false );
42
+ public static final MomentsProperties DEFAULTS = new MomentsProperties ();
43
43
44
44
private final Granularity granularity ;
45
45
private final ZoneId zoneId ;
@@ -49,13 +49,22 @@ public class MomentsProperties {
49
49
50
50
private final ShiftedQuarters quarters ;
51
51
52
+ /**
53
+ * Creates a new {@link MomentsProperties} with default granularity of {@value Granularity#HOURS}, a {@link ZoneId} of
54
+ * {@code UTC}, the JVM's default {@link Locale} to determine starts of weeks, an unshifted {@link ShiftedQuarter} and
55
+ * not enabling the {@link TimeMachine}.
56
+ */
57
+ private MomentsProperties () {
58
+ this (null , null , null , (Month ) null , false );
59
+ }
60
+
52
61
/**
53
62
* Creates a new {@link MomentsProperties} for the given {@link Granularity}, {@link ZoneId}, {@link Locale} and
54
63
* quarter start {@link Month}.
55
64
*
56
65
* @param granularity can be {@literal null}, defaults to {@value Granularity#HOURS}.
57
66
* @param zoneId the time zone id to use, defaults to {@code UTC}.
58
- * @param locale
67
+ * @param locale the locale to determine starts of weeks.
59
68
* @param quarterStartMonth the {@link Month} at which quarters start. Defaults to {@value Month#JANUARY}, resulting
60
69
* in {@link ShiftedQuarter}s without any shift.
61
70
*/
0 commit comments