-
Enhancement
-
Resolution: Fixed
-
P4
-
8, 11, 16, 17
-
b07
SonarCloud instance reports the bug here:
Identical sub-expressions on both sides of operator "||".
bool DebugInformationRecorder::recorders_frozen() {
return _oop_recorder->is_complete() || _oop_recorder->is_complete();
}
It seems to be this way sinceJDK-6964458. I don't see why it is this way. I think the intent was to check and freeze these two recorders:
class OopRecorder : public ResourceObj {
private:
ValueRecorder<jobject> _oops;
ValueRecorder<Metadata*> _metadata;
...but they are in OopRecorder already, and so we already get what we want with a single call:
#ifdef ASSERT
bool is_complete() {
assert(_oops.is_complete() == _metadata.is_complete(), "must agree");
return _oops.is_complete();
}
#endif
Identical sub-expressions on both sides of operator "||".
bool DebugInformationRecorder::recorders_frozen() {
return _oop_recorder->is_complete() || _oop_recorder->is_complete();
}
It seems to be this way since
class OopRecorder : public ResourceObj {
private:
ValueRecorder<jobject> _oops;
ValueRecorder<Metadata*> _metadata;
...but they are in OopRecorder already, and so we already get what we want with a single call:
#ifdef ASSERT
bool is_complete() {
assert(_oops.is_complete() == _metadata.is_complete(), "must agree");
return _oops.is_complete();
}
#endif
- relates to
-
JDK-6964458 Reimplement class meta-data storage to use native memory
-
- Resolved
-