mirror of
https://github.com/darksaid98/HuskHomes.git
synced 2026-12-02 06:28:49 +00:00
Fix updating home privacy not working on SQLite
This commit is contained in:
1 parent
7a63e8c173
commit
a5d8b6ff35
3 files changed
+29
-8
No files matched your search
@@ -60,11 +60,16 @@ public class PositionMeta {
|
||||
* @return The deserialized {@link Map}
|
||||
*/
|
||||
private static Map<String, String> deserializeTags(@Nullable String serializedTags) {
|
||||
if (serializedTags == null || serializedTags.isBlank()) {
|
||||
return new HashMap<>();
|
||||
try {
|
||||
if (serializedTags == null || serializedTags.isBlank()) {
|
||||
return new HashMap<>();
|
||||
}
|
||||
return new Gson().fromJson(serializedTags, new TypeToken<Map<String, String>>() {
|
||||
}.getType());
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return new Gson().fromJson(serializedTags, new TypeToken<Map<String, String>>() {
|
||||
}.getType());
|
||||
return new HashMap<>();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -74,10 +79,15 @@ public class PositionMeta {
|
||||
*/
|
||||
@Nullable
|
||||
public String getSerializedTags() {
|
||||
if (tags.isEmpty()) {
|
||||
return null;
|
||||
try {
|
||||
if (tags.isEmpty()) {
|
||||
return null;
|
||||
}
|
||||
return new Gson().toJson(tags);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return new Gson().toJson(tags);
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user