@@ -224,12 +224,12 @@ public static final class Business<T> implements NovaSetting<T>, Serializable {
224224 private static final long serialVersionUID = -7174484717138758485L ;
225225
226226 private final String key ;
227- private final Supplier < T > defaultValue ;
227+ private final T defaultValue ;
228228 private final String dKey ;
229229 private final Set <T > possibleValues ;
230230 private final Class <T > clazz ;
231231
232- private Business (String key , String dKey , Class <T > clazz , Supplier < T > defaultValue , Set <T > possibleValues ) {
232+ private Business (String key , String dKey , Class <T > clazz , T defaultValue , Set <T > possibleValues ) {
233233 this .key = key ;
234234 this .dKey = dKey ;
235235 this .defaultValue = defaultValue ;
@@ -238,20 +238,20 @@ private Business(String key, String dKey, Class<T> clazz, Supplier<T> defaultVal
238238 }
239239
240240 private static <T extends Enum <T >> Business <T > ofEnum (String key , String dKey , Class <T > clazz , T defaultValue ) {
241- return new Business <>(key , dKey , clazz , () -> defaultValue , ImmutableSet .copyOf (defaultValue .getDeclaringClass ().getEnumConstants ()));
241+ return new Business <>(key , dKey , clazz , defaultValue , ImmutableSet .copyOf (defaultValue .getDeclaringClass ().getEnumConstants ()));
242242 }
243243
244244 private static Business <Boolean > ofBoolean (String key , String dKey , boolean defaultValue ) {
245- return new Business <>(key , dKey , Boolean .class , () -> defaultValue , ImmutableSet .of (true , false ));
245+ return new Business <>(key , dKey , Boolean .class , defaultValue , ImmutableSet .of (true , false ));
246246 }
247247
248248 private static Business <Boolean > ofBoolean (String key , String dKey , Supplier <Boolean > defaultValue ) {
249- return new Business <>(key , dKey , Boolean .class , defaultValue , ImmutableSet .of (true , false ));
249+ return new Business <>(key , dKey , Boolean .class , defaultValue . get () , ImmutableSet .of (true , false ));
250250 }
251251
252252 @ Override
253253 public T getDefaultValue () {
254- return defaultValue . get () ;
254+ return defaultValue ;
255255 }
256256
257257 @ Override
0 commit comments