Archiviert
13
0

Update testing nms package

Dieser Commit ist enthalten in:
Dan Mulloy 2018-09-15 14:48:40 -04:00
Ursprung 776ec56a2d
Commit 7e12f57eda
2 geänderte Dateien mit 11 neuen und 2 gelöschten Zeilen

Datei anzeigen

@ -21,7 +21,7 @@ package com.comphenix.protocol.utility;
*/ */
public final class Constants { public final class Constants {
public static final String PACKAGE_VERSION = "v1_13_R1"; public static final String PACKAGE_VERSION = "v1_13_R2";
public static final String NMS = "net.minecraft.server." + PACKAGE_VERSION; public static final String NMS = "net.minecraft.server." + PACKAGE_VERSION;
public static final String OBC = "org.bukkit.craftbukkit." + PACKAGE_VERSION; public static final String OBC = "org.bukkit.craftbukkit." + PACKAGE_VERSION;
} }

Datei anzeigen

@ -575,7 +575,7 @@ public class PacketContainerTest {
return; return;
} }
} else { } else {
if (a.equals(b) || Objects.equals(a, b) || a.toString().equals(b.toString())) { if (a.equals(b) || Objects.equals(a, b) || stringEquality(a, b)) {
return; return;
} }
} }
@ -587,6 +587,15 @@ public class PacketContainerTest {
assertEquals(a, b); assertEquals(a, b);
} }
private boolean stringEquality(Object a, Object b) {
try {
return a.toString().equals(b.toString());
} catch (Exception ex) {
// internal null pointers, usually
return false;
}
}
/** /**
* Get the underlying array as an object array. * Get the underlying array as an object array.
* @param val - array wrapped as an Object. * @param val - array wrapped as an Object.