mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-24 17:22:55 +01:00
Check for non-existent class alias; Fixes BUKKIT-1780
By: Wesley Wolfe <weswolf@aol.com>
This commit is contained in:
parent
03af91781c
commit
681de09ad0
1 changed files with 5 additions and 3 deletions
|
@ -164,9 +164,11 @@ public class ConfigurationSerialization {
|
||||||
String alias = (String) args.get(SERIALIZED_TYPE_KEY);
|
String alias = (String) args.get(SERIALIZED_TYPE_KEY);
|
||||||
|
|
||||||
if (alias == null) {
|
if (alias == null) {
|
||||||
throw new IllegalArgumentException("Specified class does not exist ('" + alias + ")'");
|
throw new IllegalArgumentException("Cannot have null alias");
|
||||||
} else {
|
}
|
||||||
clazz = getClassByAlias(alias);
|
clazz = getClassByAlias(alias);
|
||||||
|
if (clazz == null) {
|
||||||
|
throw new IllegalArgumentException("Specified class does not exist ('" + alias + "')");
|
||||||
}
|
}
|
||||||
} catch (ClassCastException ex) {
|
} catch (ClassCastException ex) {
|
||||||
ex.fillInStackTrace();
|
ex.fillInStackTrace();
|
||||||
|
|
Loading…
Add table
Reference in a new issue