first commit
Build AsminVoicechat / prepare-release (push) Successful in 14s
Build AsminVoicechat / build-and-test (17) (push) Canceled after 0s
Build AsminVoicechat / build-and-test (18) (push) Canceled after 0s
Build AsminVoicechat / build-and-test (19) (push) Canceled after 0s
Build AsminVoicechat / build-and-test (20) (push) Canceled after 0s
Build AsminVoicechat / build-and-test (21) (push) Canceled after 0s
Build AsminVoicechat / build-and-test (22) (push) Canceled after 0s
Build AsminVoicechat / build-and-test (23) (push) Canceled after 0s
Build AsminVoicechat / build-and-test (24) (push) Canceled after 0s
Build AsminVoicechat / build-and-test (25) (push) Canceled after 0s
Build AsminVoicechat / build-and-test (26) (push) Canceled after 0s
Build AsminVoicechat / build-and-test (27-ea) (push) Canceled after 0s
Build AsminVoicechat / build-and-test (16) (push) Canceled after 38s
Build AsminVoicechat / prepare-release (push) Successful in 14s
Build AsminVoicechat / build-and-test (17) (push) Canceled after 0s
Build AsminVoicechat / build-and-test (18) (push) Canceled after 0s
Build AsminVoicechat / build-and-test (19) (push) Canceled after 0s
Build AsminVoicechat / build-and-test (20) (push) Canceled after 0s
Build AsminVoicechat / build-and-test (21) (push) Canceled after 0s
Build AsminVoicechat / build-and-test (22) (push) Canceled after 0s
Build AsminVoicechat / build-and-test (23) (push) Canceled after 0s
Build AsminVoicechat / build-and-test (24) (push) Canceled after 0s
Build AsminVoicechat / build-and-test (25) (push) Canceled after 0s
Build AsminVoicechat / build-and-test (26) (push) Canceled after 0s
Build AsminVoicechat / build-and-test (27-ea) (push) Canceled after 0s
Build AsminVoicechat / build-and-test (16) (push) Canceled after 38s
This commit is contained in:
commit
bbccd4a815
454 files changed
+45050
No files matched your search
+42
@@ -0,0 +1,42 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*
|
||||
* Could not load the following classes:
|
||||
* javax.annotation.Nullable
|
||||
*/
|
||||
package de.maxhenkel.voicechat.configbuilder.custom.serializer;
|
||||
|
||||
import de.maxhenkel.voicechat.configbuilder.custom.IntegerList;
|
||||
import de.maxhenkel.voicechat.configbuilder.entry.serializer.ValueSerializer;
|
||||
import java.util.ArrayList;
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
public class IntegerListValueSerializer
|
||||
implements ValueSerializer<IntegerList> {
|
||||
public static final IntegerListValueSerializer INSTANCE = new IntegerListValueSerializer();
|
||||
|
||||
@Override
|
||||
@Nullable
|
||||
public IntegerList deserialize(String str) {
|
||||
ArrayList<Integer> resultList = new ArrayList<Integer>();
|
||||
for (String s : str.split(",")) {
|
||||
try {
|
||||
resultList.add(Integer.valueOf(s));
|
||||
}
|
||||
catch (NumberFormatException e) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
return IntegerList.of(resultList);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String serialize(IntegerList val) {
|
||||
ArrayList<String> resultList = new ArrayList<String>(val.size());
|
||||
for (Integer i : val) {
|
||||
resultList.add(String.valueOf(i));
|
||||
}
|
||||
return String.join((CharSequence)",", resultList);
|
||||
}
|
||||
}
|
||||
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*/
|
||||
package de.maxhenkel.voicechat.configbuilder.custom.serializer;
|
||||
|
||||
import de.maxhenkel.voicechat.configbuilder.custom.StringList;
|
||||
import de.maxhenkel.voicechat.configbuilder.entry.serializer.ValueSerializer;
|
||||
import java.util.ArrayList;
|
||||
|
||||
public class StringListValueSerializer
|
||||
implements ValueSerializer<StringList> {
|
||||
public static final StringListValueSerializer INSTANCE = new StringListValueSerializer();
|
||||
|
||||
@Override
|
||||
public StringList deserialize(String str) {
|
||||
ArrayList<String> resultList = new ArrayList<String>();
|
||||
for (String s : str.split("(?<!\\\\),")) {
|
||||
resultList.add(s.replace("\\,", ","));
|
||||
}
|
||||
return StringList.of(resultList);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String serialize(StringList val) {
|
||||
ArrayList<String> resultList = new ArrayList<String>(val.size());
|
||||
for (String str : val) {
|
||||
resultList.add(str.replace(",", "\\,"));
|
||||
}
|
||||
return String.join((CharSequence)",", resultList);
|
||||
}
|
||||
}
|
||||
|
||||
+55
@@ -0,0 +1,55 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*
|
||||
* Could not load the following classes:
|
||||
* javax.annotation.Nullable
|
||||
*/
|
||||
package de.maxhenkel.voicechat.configbuilder.custom.serializer;
|
||||
|
||||
import de.maxhenkel.voicechat.configbuilder.custom.StringMap;
|
||||
import de.maxhenkel.voicechat.configbuilder.entry.serializer.ValueSerializer;
|
||||
import java.util.ArrayList;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.Map;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
public class StringMapValueSerializer
|
||||
implements ValueSerializer<StringMap> {
|
||||
public static final StringMapValueSerializer INSTANCE = new StringMapValueSerializer();
|
||||
public static final Pattern QUOTE_ESCAPE_PATTERN = Pattern.compile("\"((?:(?![\"\\\\]).|\\\\.)*)\"\\s*=\\s*\"((?:(?![\"\\\\]).|\\\\.)*)\"");
|
||||
|
||||
@Override
|
||||
@Nullable
|
||||
public StringMap deserialize(String str) {
|
||||
boolean matches = QUOTE_ESCAPE_PATTERN.splitAsStream(str).allMatch(s -> s.trim().isEmpty() || s.trim().equals(","));
|
||||
if (!matches) {
|
||||
return null;
|
||||
}
|
||||
LinkedHashMap<String, String> map = new LinkedHashMap<String, String>();
|
||||
Matcher matcher = QUOTE_ESCAPE_PATTERN.matcher(str);
|
||||
while (matcher.find()) {
|
||||
map.put(StringMapValueSerializer.unescape(matcher.group(1)), StringMapValueSerializer.unescape(matcher.group(2)));
|
||||
}
|
||||
return StringMap.of(map);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String serialize(StringMap val) {
|
||||
ArrayList<String> resultList = new ArrayList<String>(val.size());
|
||||
for (Map.Entry entry : val.entrySet()) {
|
||||
resultList.add("\"" + StringMapValueSerializer.escape((String)entry.getKey()) + "\"=\"" + StringMapValueSerializer.escape((String)entry.getValue()) + "\"");
|
||||
}
|
||||
return String.join((CharSequence)",", resultList);
|
||||
}
|
||||
|
||||
private static String escape(String input) {
|
||||
return input.replace("\\", "\\\\").replace("\"", "\\\"");
|
||||
}
|
||||
|
||||
private static String unescape(String input) {
|
||||
return input.replace("\\\"", "\"").replace("\\\\", "\\");
|
||||
}
|
||||
}
|
||||
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*/
|
||||
package de.maxhenkel.voicechat.configbuilder.custom.serializer;
|
||||
|
||||
import de.maxhenkel.voicechat.configbuilder.entry.serializer.ValueSerializer;
|
||||
import java.util.UUID;
|
||||
|
||||
public class UUIDSerializer
|
||||
implements ValueSerializer<UUID> {
|
||||
public static final UUIDSerializer INSTANCE = new UUIDSerializer();
|
||||
|
||||
@Override
|
||||
public UUID deserialize(String str) {
|
||||
return UUID.fromString(str);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String serialize(UUID val) {
|
||||
return val.toString();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user