Add contract to `ConfigEntry#getString(String)` for non-null-argument

The contract basically says that if you provide a
non-null argument to the method, it cannot return
a null value.
This commit is contained in:
Christian Koop 2022-08-18 23:07:18 +02:00
parent 3a09c19dbb
commit 78b6039d39
No known key found for this signature in database
GPG Key ID: 89A8181384E010A3
1 changed files with 1 additions and 0 deletions

View File

@ -123,6 +123,7 @@ public class ConfigEntry {
return value != null ? value.toString() : null;
}
@Contract("!null -> !null")
public @Nullable String getString(String fallbackValue) {
Object value = get();