mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 07:14:30 +02:00
8139163: InstanceKlass::cast passes through NULL
Reduce raw (InstanceKlass*) casts and InstanceKlass::cast, which no long allows null Reviewed-by: twisti, kbarrett
This commit is contained in:
parent
25cc742a8f
commit
5179fc3488
43 changed files with 215 additions and 252 deletions
|
@ -862,7 +862,7 @@ public:
|
|||
|
||||
#ifdef ASSERT
|
||||
// check whether this class or one of its superclasses was redefined
|
||||
bool has_redefined_this_or_super() const;
|
||||
bool has_redefined_this_or_super();
|
||||
#endif
|
||||
|
||||
// Access to the implementor of an interface.
|
||||
|
@ -922,7 +922,8 @@ public:
|
|||
|
||||
// Casting from Klass*
|
||||
static InstanceKlass* cast(Klass* k) {
|
||||
assert(k == NULL || k->oop_is_instance(), "cast to InstanceKlass");
|
||||
assert(k != NULL, "k should not be null");
|
||||
assert(k->oop_is_instance(), "cast to InstanceKlass");
|
||||
return static_cast<InstanceKlass*>(k);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue