mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 07:14:30 +02:00
8275137: jdk.unsupported/sun.reflect.ReflectionFactory.readObjectNoDataForSerialization uses wrong signature
Reviewed-by: dfuchs
This commit is contained in:
parent
174f553f7e
commit
4961373a67
3 changed files with 22 additions and 24 deletions
|
@ -478,7 +478,7 @@ public class ReflectionFactory {
|
|||
}
|
||||
|
||||
public final MethodHandle readObjectNoDataForSerialization(Class<?> cl) {
|
||||
return findReadWriteObjectForSerialization(cl, "readObjectNoData", ObjectInputStream.class);
|
||||
return findReadWriteObjectForSerialization(cl, "readObjectNoData", null);
|
||||
}
|
||||
|
||||
public final MethodHandle writeObjectForSerialization(Class<?> cl) {
|
||||
|
@ -493,7 +493,8 @@ public class ReflectionFactory {
|
|||
}
|
||||
|
||||
try {
|
||||
Method meth = cl.getDeclaredMethod(methodName, streamClass);
|
||||
Method meth = streamClass == null ? cl.getDeclaredMethod(methodName)
|
||||
: cl.getDeclaredMethod(methodName, streamClass);
|
||||
int mods = meth.getModifiers();
|
||||
if (meth.getReturnType() != Void.TYPE ||
|
||||
Modifier.isStatic(mods) ||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue