mirror of
https://github.com/openjdk/jdk.git
synced 2026-02-04 23:48:33 +00:00
8351967: JFR: AnnotationIterator should handle num_annotations = 0
Reviewed-by: egahlin
This commit is contained in:
parent
c8913d2c9c
commit
2eecf159af
@ -338,7 +338,7 @@ class AnnotationIterator : public StackObj {
|
||||
_buffer(_limit > 2 ? ar->adr_at(2) : nullptr),
|
||||
_current(0),
|
||||
_next(0) {
|
||||
if (_buffer != nullptr) {
|
||||
if (_limit >= 2) {
|
||||
_limit -= 2; // subtract sizeof(u2) number of annotations field
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user