Update testing nms package

This commit is contained in:
Dan Mulloy 2018-09-15 14:48:40 -04:00
parent 776ec56a2d
commit 7e12f57eda
2 changed files with 11 additions and 2 deletions

View File

@ -21,7 +21,7 @@ package com.comphenix.protocol.utility;
*/
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 OBC = "org.bukkit.craftbukkit." + PACKAGE_VERSION;
}

View File

@ -575,7 +575,7 @@ public class PacketContainerTest {
return;
}
} 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;
}
}
@ -587,6 +587,15 @@ public class PacketContainerTest {
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.
* @param val - array wrapped as an Object.