Skip to content

Commit 60c4edb

Browse files
committed
fix string configs
1 parent 717e024 commit 60c4edb

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/main/java/com/falsepattern/lib/internal/impl/config/fields/StringConfigField.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ public StringConfigField(Field field, Configuration configuration, String catego
5252
Share.LOG
5353
.warn("The field " + field.getName() + " in class " +
5454
field.getDeclaringClass().getName() +
55-
" has no DefaultDouble annotation!\nThis will be a crash in FalsePatternLib 0.11, update your code!");
55+
" has no DefaultString annotation!\nThis will be a crash in FalsePatternLib 0.11, update your code!");
5656
try {
5757
return (String) field.get(null);
5858
} catch (IllegalAccessException e) {
@@ -63,9 +63,6 @@ public StringConfigField(Field field, Configuration configuration, String catego
6363
.map(Config.StringMaxLength::value)
6464
.orElse(256);
6565
property.setDefaultValue(defaultValue);
66-
if (!property.isDoubleValue()) {
67-
setToDefault();
68-
}
6966
property.comment +=
7067
"\n[max length: " + maxLength + (pattern != null ? ", pattern: \"" + pattern.pattern() + "\"" : "") +
7168
", default: \"" + defaultValue + "\"]";

0 commit comments

Comments
 (0)