mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 15:24:43 +02:00
8263721: Unify oop casting
Reviewed-by: kbarrett, coleenp
This commit is contained in:
parent
329697b02e
commit
a79f095697
90 changed files with 248 additions and 249 deletions
|
@ -100,7 +100,7 @@ oop Reflection::box(jvalue* value, BasicType type, TRAPS) {
|
|||
}
|
||||
if (is_reference_type(type)) {
|
||||
// regular objects are not boxed
|
||||
return (oop) value->l;
|
||||
return cast_to_oop(value->l);
|
||||
}
|
||||
oop result = java_lang_boxing_object::create(type, value, CHECK_NULL);
|
||||
if (result == NULL) {
|
||||
|
@ -274,7 +274,7 @@ void Reflection::array_set(jvalue* value, arrayOop a, int index, BasicType value
|
|||
}
|
||||
if (a->is_objArray()) {
|
||||
if (value_type == T_OBJECT) {
|
||||
oop obj = (oop) value->l;
|
||||
oop obj = cast_to_oop(value->l);
|
||||
if (obj != NULL) {
|
||||
Klass* element_klass = ObjArrayKlass::cast(a->klass())->element_klass();
|
||||
if (!obj->is_a(element_klass)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue