From cedc5dbf6d2bcc038ebb0dff1be77c460388af11 Mon Sep 17 00:00:00 2001 From: Alex Cook Date: Fri, 20 Feb 2026 16:19:35 -0500 Subject: [PATCH 1/3] fix: clarify required.method.not.called wording --- .../checkerframework/checker/resourceleak/messages.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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. From 8e757c6997ac287de75b90085e37e98d0e563898 Mon Sep 17 00:00:00 2001 From: Alex Cook Date: Fri, 20 Feb 2026 16:20:20 -0500 Subject: [PATCH 2/3] fix: clarify out-of-scope reason text --- .../checker/resourceleak/MustCallConsistencyAnalyzer.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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(); From 65718e0e83e601a7b449f0266dd03fc178cae9f1 Mon Sep 17 00:00:00 2001 From: Werner Dietl Date: Mon, 23 Mar 2026 10:09:43 -0400 Subject: [PATCH 3/3] Add issue number to changelog --- docs/CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)