Hide item deserialization errors unless using development branch (fixes #550)
This commit is contained in:
parent
957bf70c26
commit
aaa7a3536a
2 changed files with 13 additions and 4 deletions
|
|
@ -65,7 +65,7 @@ public class EntityStatement {
|
|||
|
||||
resultSet.close();
|
||||
}
|
||||
catch (Exception e) { // only display this exception on development branch
|
||||
catch (Exception e) { // only display exception on development branch
|
||||
if (!ConfigHandler.EDITION_BRANCH.contains("-dev")) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -586,10 +586,19 @@ public class Util extends Queue {
|
|||
return result;
|
||||
}
|
||||
|
||||
public static ItemMeta deserializeItemMeta(Class<? extends ItemMeta> itemMetaClass, Map<String, Object> args) {
|
||||
public static ItemMeta deserializeItemMetax(Class<? extends ItemMeta> itemMetaClass, Map<String, Object> args) {
|
||||
try {
|
||||
DelegateDeserialization delegate = itemMetaClass.getAnnotation(DelegateDeserialization.class);
|
||||
return (ItemMeta) ConfigurationSerialization.deserializeObject(args, delegate.value());
|
||||
}
|
||||
catch (Exception e) { // only display exception on development branch
|
||||
if (!ConfigHandler.EDITION_BRANCH.contains("-dev")) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public static <K, V extends Comparable<? super V>> SortedSet<Map.Entry<K, V>> entriesSortedByValues(Map<K, V> map) {
|
||||
SortedSet<Map.Entry<K, V>> sortedEntries = new TreeSet<>((e1, e2) -> {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue