< prev index next >
src/java.base/share/classes/java/io/ObjectStreamField.java
Print this page
rev 13121 : 8143926: ObjectStreamField constructor eagerly load ObjectStreamClass
Reviewed-by: TBD
*** 24,33 ****
--- 24,34 ----
*/
package java.io;
import java.lang.reflect.Field;
+ import sun.invoke.util.BytecodeDescriptor;
import sun.reflect.CallerSensitive;
import sun.reflect.Reflection;
import sun.reflect.misc.ReflectUtil;
/**
*** 89,99 ****
throw new NullPointerException();
}
this.name = name;
this.type = type;
this.unshared = unshared;
! signature = ObjectStreamClass.getClassSignature(type).intern();
field = null;
}
/**
* Creates an ObjectStreamField representing a field with the given name,
--- 90,100 ----
throw new NullPointerException();
}
this.name = name;
this.type = type;
this.unshared = unshared;
! signature = BytecodeDescriptor.unparse(type).intern();
field = null;
}
/**
* Creates an ObjectStreamField representing a field with the given name,
*** 135,145 ****
this.field = field;
this.unshared = unshared;
name = field.getName();
Class<?> ftype = field.getType();
type = (showType || ftype.isPrimitive()) ? ftype : Object.class;
! signature = ObjectStreamClass.getClassSignature(ftype).intern();
}
/**
* Get the name of this field.
*
--- 136,146 ----
this.field = field;
this.unshared = unshared;
name = field.getName();
Class<?> ftype = field.getType();
type = (showType || ftype.isPrimitive()) ? ftype : Object.class;
! signature = BytecodeDescriptor.unparse(ftype).intern();
}
/**
* Get the name of this field.
*
< prev index next >