Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -431,6 +431,8 @@ private void reportFailure(
AnnotatedDeclaredType enclosingType,
AnnotatedExecutableType overridden,
AnnotatedDeclaredType overriddenType,
SideEffectAnnotation seaOfOverriderMethod,
SideEffectAnnotation seaOfOverriddenMethod,
List<String> overriderLocks,
List<String> overriddenLocks) {
// Get the type of the overriding method.
Expand All @@ -446,14 +448,27 @@ private void reportFailure(

if (overriderLocks == null || overriddenLocks == null) {
checker.reportError(
overriderTree, messageKey, overriderTyp, overriderMeth, overriddenTyp, overriddenMeth);
overriderTree,
messageKey,
seaOfOverriderMethod,
seaOfOverriddenMethod,
overriderTyp,
seaOfOverriderMethod,
overriderMeth,
overriddenTyp,
seaOfOverriddenMethod,
overriddenMeth);
} else {
checker.reportError(
overriderTree,
messageKey,
seaOfOverriderMethod,
seaOfOverriddenMethod,
overriderTyp,
seaOfOverriderMethod,
overriderMeth,
overriddenTyp,
seaOfOverriddenMethod,
overriddenMeth,
overriderLocks,
overriddenLocks);
Expand Down Expand Up @@ -487,6 +502,8 @@ protected boolean checkOverride(
enclosingType,
overriddenMethodType,
overriddenType,
seaOfOverriderMethod,
seaOfOverriddenMethod,
null,
null);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
### Error messages for the Lock Checker
contracts.precondition=call to '%s' requires '%s' to be held
override.sideeffect=the side-effect annotation on an overrider method must be at least as strong as the one the overridden method.%nmethod in %s%n %s%n cannot override method in %s%n %s
override.sideeffect=the overrider annotation %s is weaker than overridden annotation %s.%nmethod in %s%n %s %s%ncannot override method in %s%n %s %s
multiple.sideeffect.annotations=method is annotated with multiple side effect annotations
multiple.lock.precondition.annotations=only one @Holding, @net.jcip.annotations.GuardedBy or @javax.annotation.concurrent.GuardedBy annotation is allowed on a method
multiple.guardedby.annotations=only one @org.checkerframework.checker.lock.qual.GuardedBy, @net.jcip.annotations.GuardedBy or @javax.annotation.concurrent.GuardedBy annotation is allowed on a variable declaration
Expand Down
Loading