New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add ObservationRegistry hasRemainingCurrentScope and similar assertions #3303
Add ObservationRegistry hasRemainingCurrentScope and similar assertions #3303
Conversation
0f90f37
to
b58c7d9
Compare
For the assertion messages, it seems that Note also that I've modified the |
5857f46
to
7ba1a55
Compare
(squashed into a single commit) |
failWithMessage( | ||
"Expected current Scope in the registry to be same as a provided Scope tied to observation named <%s> but was a different one (tied to observation named <%s>)", | ||
scope.getCurrentObservation().getContext().getName(), | ||
current.getCurrentObservation().getContext().getName()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NULL_DEREFERENCE: object current
last assigned on line 185 could be null and is dereferenced at line 195.
Reply with "@sonatype-lift help" for info about LiftBot commands.
Reply with "@sonatype-lift ignore" to tell LiftBot to leave out the above finding from this PR.
Reply with "@sonatype-lift ignoreall" to tell LiftBot to leave out all the findings from this PR and from the status bar in Github.
When talking to LiftBot, you need to refresh the page to see its response. Click here to get to know more about LiftBot commands.
Was this a good recommendation?
[ 🙁 Not relevant ] - [ 😕 Won't fix ] - [ 😑 Not critical, will fix ] - [ 🙂 Critical, will fix ] - [ 😊 Critical, fixing now ]
if (current == scope) { | ||
failWithMessage( | ||
"Expected current Scope in the registry to be different from a provided Scope tied to observation named <%s> but was the same", | ||
scope.getCurrentObservation().getContext().getName()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NULL_DEREFERENCE: object scope
could be null and is dereferenced at line 171.
Reply with "@sonatype-lift help" for info about LiftBot commands.
Reply with "@sonatype-lift ignore" to tell LiftBot to leave out the above finding from this PR.
Reply with "@sonatype-lift ignoreall" to tell LiftBot to leave out all the findings from this PR and from the status bar in Github.
When talking to LiftBot, you need to refresh the page to see its response. Click here to get to know more about LiftBot commands.
Was this a good recommendation?
[ 🙁 Not relevant ] - [ 😕 Won't fix ] - [ 😑 Not critical, will fix ] - [ 🙂 Critical, will fix ] - [ 😊 Critical, fixing now ]
Mirroring registry.getCurrentObservation() assertions, these target the
registry.getCurrentObservationScope() instead.
TODO: