mirror of
https://github.com/BlueMap-Minecraft/BlueMap.git
synced 2025-02-10 17:41:50 +01:00
Fix use of java-19 api
This commit is contained in:
parent
8455b50fc3
commit
2c2d2f9227
@ -108,13 +108,13 @@ private void dumpInstance(Object instance, JsonWriter writer, Set<Object> 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<Object> 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<Object> alreadyDumped) throws IOException {
|
||||
|
||||
DebugDump typedd = type.getAnnotation(DebugDump.class);
|
||||
|
Loading…
Reference in New Issue
Block a user