diff --git a/checker/src/main/java/org/checkerframework/checker/resourceleak/MustCallConsistencyAnalyzer.java b/checker/src/main/java/org/checkerframework/checker/resourceleak/MustCallConsistencyAnalyzer.java index f38611ebd67b..00b4a4f89eb7 100644 --- a/checker/src/main/java/org/checkerframework/checker/resourceleak/MustCallConsistencyAnalyzer.java +++ b/checker/src/main/java/org/checkerframework/checker/resourceleak/MustCallConsistencyAnalyzer.java @@ -1540,7 +1540,7 @@ private void checkReassignmentToField(Set obligations, AssignmentNod formatMissingMustCallMethods(mcValues), "field " + lhsElement.getSimpleName().toString(), lhsElement.asType().toString(), - "Field assignment outside method or declaration might overwrite field's" + "field assignment outside method or declaration might overwrite field's" + " current value"); return; } @@ -1667,7 +1667,7 @@ && varTrackedInObligations(obligations, (LocalVariableNode) receiver)) formatMissingMustCallMethods(mcValues), "field " + lhsElement.getSimpleName().toString(), lhsElement.asType().toString(), - " Non-final owning field might be overwritten"); + "non-final owning field might be overwritten"); } } } @@ -2045,9 +2045,9 @@ private void propagateObligationsToSuccessorBlock( // exit, but that doesn't seem to provide additional helpful // information. "regular method exit" - : "possible exceptional exit due to " + : "possible exceptional exit before required method call, triggered by " + ((ExceptionBlock) currentBlock).getNode().getTree() - + " with exception type " + + " throwing exception type " + exceptionType; // Computed outside the Obligation loop for efficiency. AccumulationStore regularStoreOfSuccessor = cmAtf.getInput(successor).getRegularStore(); diff --git a/checker/src/main/java/org/checkerframework/checker/resourceleak/messages.properties b/checker/src/main/java/org/checkerframework/checker/resourceleak/messages.properties index a9df3c247117..d611635c54cb 100644 --- a/checker/src/main/java/org/checkerframework/checker/resourceleak/messages.properties +++ b/checker/src/main/java/org/checkerframework/checker/resourceleak/messages.properties @@ -1,4 +1,4 @@ -required.method.not.called=@MustCall %s may not have been invoked on %s or any of its aliases.%nThe type of object is: %s.%nReason for going out of scope: %s +required.method.not.called=Required %s may not have been invoked on %s or any of its aliases.%nThe type of object is: %s.%nReason for going out of scope: %s missing.creates.mustcall.for=Method %s re-assigns the non-final, owning field %s.%s, but does not have a corresponding @CreatesMustCallFor annotation. incompatible.creates.mustcall.for=Method %s re-assigns the non-final, owning field %s.%s, but its @CreatesMustCallFor annotation targets %s. reset.not.owning=Calling method %s resets the must-call obligations of the expression %s, which is non-owning. Either annotate its declaration with an @Owning annotation, extract it into a local variable, or write a corresponding @CreatesMustCallFor annotation on the method that encloses this statement. diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index 58c433a1a7ce..2a24e77feee0 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -53,7 +53,7 @@ Removed method `InitializationParentAnnotatedTypeFactory.createUnderInitializati **Closed issues:** -eisop#1247, eisop#1263, eisop#1310, eisop#1326, typetools#7096, eisop#1448, eisop#1543. +eisop#1247, eisop#1263, eisop#1310, eisop#1326, typetools#7096, eisop#1448, eisop#1542, eisop#1543. Version 3.49.5 (June 30, 2025)