mirror of
https://github.com/openjdk/jdk.git
synced 2026-03-16 10:53:31 +00:00
8348195: More u2 conversion warnings after JDK-8347147
Reviewed-by: coleenp, dholmes
This commit is contained in:
parent
893d00ac7d
commit
25bb698eff
@ -2126,7 +2126,7 @@ Method* ClassFileParser::parse_method(const ClassFileStream* const cfs,
|
||||
// access_flags, name_index, descriptor_index, attributes_count
|
||||
cfs->guarantee_more(8, CHECK_NULL);
|
||||
|
||||
int flags = cfs->get_u2_fast();
|
||||
u2 flags = cfs->get_u2_fast();
|
||||
const u2 name_index = cfs->get_u2_fast();
|
||||
const int cp_size = cp->length();
|
||||
guarantee_property(
|
||||
|
||||
@ -102,7 +102,7 @@ inline void FieldInfoReader::read_field_info(FieldInfo& fi) {
|
||||
fi._name_index = checked_cast<u2>(next_uint());
|
||||
fi._signature_index = checked_cast<u2>(next_uint());
|
||||
fi._offset = next_uint();
|
||||
fi._access_flags = AccessFlags(next_uint());
|
||||
fi._access_flags = AccessFlags(checked_cast<u2>(next_uint()));
|
||||
fi._field_flags = FieldInfo::FieldFlags(next_uint());
|
||||
if (fi._field_flags.is_initialized()) {
|
||||
fi._initializer_index = checked_cast<u2>(next_uint());
|
||||
|
||||
@ -1434,7 +1434,7 @@ methodHandle Method::make_method_handle_intrinsic(vmIntrinsics::ID iid,
|
||||
cp->set_is_for_method_handle_intrinsic();
|
||||
|
||||
// decide on access bits: public or not?
|
||||
int flags_bits = (JVM_ACC_NATIVE | JVM_ACC_SYNTHETIC | JVM_ACC_FINAL);
|
||||
u2 flags_bits = (JVM_ACC_NATIVE | JVM_ACC_SYNTHETIC | JVM_ACC_FINAL);
|
||||
bool must_be_static = MethodHandles::is_signature_polymorphic_static(iid);
|
||||
if (must_be_static) flags_bits |= JVM_ACC_STATIC;
|
||||
assert((flags_bits & JVM_ACC_PUBLIC) == 0, "do not expose these methods");
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user