Handle the possibility that getSuperclass() returns NULL.
Thanks to libraryaddict for discovering this bug.
Dieser Commit ist enthalten in:
Ursprung
4dea26b847
Commit
c84a5d7fa2
@ -339,8 +339,9 @@ class CommandPacket extends CommandBase {
|
|||||||
Class<?> clazz = packet.getClass();
|
Class<?> clazz = packet.getClass();
|
||||||
|
|
||||||
// Get the first Minecraft super class
|
// Get the first Minecraft super class
|
||||||
while ((!MinecraftReflection.isMinecraftClass(clazz) ||
|
while (clazz != null && clazz != Object.class &&
|
||||||
Factory.class.isAssignableFrom(clazz)) && clazz != Object.class) {
|
(!MinecraftReflection.isMinecraftClass(clazz) ||
|
||||||
|
Factory.class.isAssignableFrom(clazz))) {
|
||||||
clazz = clazz.getSuperclass();
|
clazz = clazz.getSuperclass();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -119,7 +119,7 @@ public class ObjectWriter {
|
|||||||
// Copy private fields underneath
|
// Copy private fields underneath
|
||||||
Class<?> superclass = commonType.getSuperclass();
|
Class<?> superclass = commonType.getSuperclass();
|
||||||
|
|
||||||
if (!superclass.equals(Object.class)) {
|
if (superclass != null && !superclass.equals(Object.class)) {
|
||||||
copyToInternal(source, destination, superclass, false);
|
copyToInternal(source, destination, superclass, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -210,7 +210,7 @@ public class PrettyPrinter {
|
|||||||
ObjectPrinter printer) throws IllegalAccessException {
|
ObjectPrinter printer) throws IllegalAccessException {
|
||||||
|
|
||||||
// See if we're supposed to skip this class
|
// See if we're supposed to skip this class
|
||||||
if (current == Object.class || (stop != null && current.equals(stop))) {
|
if (current == null || current == Object.class || (stop != null && current.equals(stop))) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren