Skip to content

Commit 8fc0ea4

Browse files
author
duke
committedApr 20, 2022
Automatic merge of jdk:master into master
2 parents d4145d5 + e6c5f28 commit 8fc0ea4

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed
 

‎src/java.base/share/classes/sun/reflect/annotation/AnnotationInvocationHandler.java

+1-10
Original file line numberDiff line numberDiff line change
@@ -666,7 +666,7 @@ private void readObject(java.io.ObjectInputStream s)
666666
if (!(memberType.isInstance(value) ||
667667
value instanceof ExceptionProxy)) {
668668
value = new AnnotationTypeMismatchExceptionProxy(
669-
objectToString(value))
669+
Objects.toIdentityString(value))
670670
.setMember(annotationType.members().get(name));
671671
}
672672
}
@@ -677,15 +677,6 @@ private void readObject(java.io.ObjectInputStream s)
677677
UnsafeAccessor.setMemberValues(this, mv);
678678
}
679679

680-
/*
681-
* Create a textual representation of the argument without calling
682-
* any overridable methods of the argument.
683-
*/
684-
private static String objectToString(Object value) {
685-
return value.getClass().getName() + "@" +
686-
Integer.toHexString(System.identityHashCode(value));
687-
}
688-
689680
private static class UnsafeAccessor {
690681
private static final jdk.internal.misc.Unsafe unsafe
691682
= jdk.internal.misc.Unsafe.getUnsafe();

0 commit comments

Comments
 (0)
Please sign in to comment.