diff --git a/BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/debug/StateDumper.java b/BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/debug/StateDumper.java index 1fc1b7802..bd2c140e2 100644 --- a/BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/debug/StateDumper.java +++ b/BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/debug/StateDumper.java @@ -108,13 +108,13 @@ private void dumpInstance(Object instance, JsonWriter writer, Set alread } if (!alreadyDumped.add(instance)) { - writer.value("<<" + Objects.toIdentityString(instance) + ">>"); + writer.value("<<" + toIdentityString(instance) + ">>"); return; } writer.beginObject(); try { - String identityString = Objects.toIdentityString(instance); + String identityString = toIdentityString(instance); writer.name("#identity").value(identityString); if (instance instanceof Map map) { @@ -208,6 +208,10 @@ private void dumpInstance(Object instance, JsonWriter writer, Set alread } } + private static String toIdentityString(Object instance) { + return instance.getClass().getName() + "@" + Integer.toHexString(System.identityHashCode(instance)); + } + private void dumpAnnotatedInstance(Class type, Object instance, JsonWriter writer, Set alreadyDumped) throws IOException { DebugDump typedd = type.getAnnotation(DebugDump.class);