Fix incorrectly reading node value from the value field when reading from the flatfile meta section (#2312)

This commit is contained in:
Luck 2020-05-20 18:21:49 +01:00
parent ed85ab1bfd
commit ea5a05d770
No known key found for this signature in database
GPG Key ID: EFA9B3EC5FD90F8B

View File

@ -474,13 +474,11 @@ public abstract class AbstractConfigurateStorage implements StorageImplementatio
}
private static Node readMetaAttributes(ConfigurationNode attributes, Function<ConfigurationNode, NodeBuilder<?, ?>> permissionFunction) {
boolean value = attributes.getNode("value").getBoolean(true);
long expiryVal = attributes.getNode("expiry").getLong(0L);
Instant expiry = expiryVal == 0L ? null : Instant.ofEpochSecond(expiryVal);
ImmutableContextSet context = readContexts(attributes);
return permissionFunction.apply(attributes)
.value(value)
.expiry(expiry)
.context(context)
.build();