3
0
Mirror von https://github.com/TheSilentPro/HeadDB.git synchronisiert 2024-12-27 11:20:05 +01:00

Merge branch 'master' into dev

Dieser Commit ist enthalten in:
Silent 2021-04-21 19:04:13 +02:00 committet von GitHub
Commit d3def0d2cf
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 4AEE18F83AFDEB23

Datei anzeigen

@ -142,9 +142,11 @@ public class HeadDatabase {
JSONArray array = (JSONArray) parser.parse(response.toString());
for (Object o : array) {
JSONObject obj = (JSONObject) o;
String uuid = obj.get("uuid").toString();
Head head = new Head(id)
.withName(obj.get("name").toString())
.withUUID(UUID.fromString(obj.get("uuid").toString()))
.withUUID(uuid.isEmpty() ? UUID.randomUUID() : UUID.fromString(uuid))
.withValue(obj.get("value").toString())
.withTags(obj.get("tags") != null ? obj.get("tags").toString() : "None")
.withCategory(category);