Skip to content

Commit

Permalink
Update to configuration 4.1.2
Browse files Browse the repository at this point in the history
  • Loading branch information
virustotalop committed Jun 25, 2023
1 parent ad3c82a commit 4abcccd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ plugins {
sourceCompatibility = 1.8
targetCompatibility = 1.8

def configurateVersion = "4.0.0"
def configurateVersion = "4.1.2"

dependencies {
testImplementation 'junit:junit:4.13.2'
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/com/clubobsidian/wrappy/helper/NodeHelper.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ public T get(Object path, Class<T> clazz, T defaultValue) {
try {
ConfigurationNode parsed = NodeUtil.parsePath(this.section.getNode(), path);
TypeToken<T> type = TypeToken.get(clazz);
return defaultValue == null ? parsed.get(type) : parsed.get(type, defaultValue);
return defaultValue == null ? parsed.get(clazz) :
parsed.empty() ? defaultValue : parsed.get(type, defaultValue);
} catch (SerializationException e) {
e.printStackTrace();
}
Expand Down

0 comments on commit 4abcccd

Please sign in to comment.