Skip to content

Commit

Permalink
Added MapYAMLParser.
Browse files Browse the repository at this point in the history
Updated FulmiCollection.
Removed unnecessary nullity annotations.
Remover org.joor.Reflect dependency since rarely used.
Fixed CallableYAMLParser saving static fields.
Fixed various bugs.
Fixed bug in IConfiguration.
  • Loading branch information
Fulminazzo committed Jan 13, 2024
1 parent c6c5e83 commit ae35bb6
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ plugins {
}

group = 'it.fulminazzo'
version = '1.4.1'
version = '1.4.2'

repositories {
mavenCentral()
Expand All @@ -19,7 +19,7 @@ dependencies {
compileOnly 'org.jetbrains:annotations:24.1.0'

implementation 'org.yaml:snakeyaml:2.2'
api 'it.fulminazzo:FulmiCollection:1.2.1'
api 'it.fulminazzo:FulmiCollection:1.2.2'

testImplementation platform('org.junit:junit-bom:5.9.1')
testImplementation 'org.junit.jupiter:junit-jupiter'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,7 @@ default <O> void set(@NotNull String path, @Nullable O o) {
try {
Class<?> tmp = ReflectionUtils.getWrapperClass(clazz);
object = object.toString();
if (tmp.equals(String.class)) return (T) object;
Method method = tmp.getMethod("valueOf", object.getClass());
return (T) method.invoke(tmp, object);
} catch (Exception e) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public SerializableYAMLParser() {
protected @NotNull BiFunctionException<@NotNull IConfiguration, @NotNull String, @Nullable Serializable> getLoader() {
return (c, s) -> {
try {
String string = c.getString(s);
String string = (String) c.getObject(s);
return string == null ? null : SerializeUtils.deserializeFromBase64(string);
} catch (IllegalArgumentException e) {
return null;
Expand Down

0 comments on commit ae35bb6

Please sign in to comment.