[typetools/checker-framework] aea310: Fix false positive in Resource Leak Checker relate...

0 views
Skip to first unread message

Narges Shadab

unread,
Nov 12, 2021, 7:32:49 PM11/12/21
to checker-fr...@googlegroups.com
Branch: refs/heads/master
Home: https://github.com/typetools/checker-framework
Commit: aea3108b6a230d45c1421bdc05ef4dda2d34b6ad
https://github.com/typetools/checker-framework/commit/aea3108b6a230d45c1421bdc05ef4dda2d34b6ad
Author: Narges Shadab <54193416+...@users.noreply.github.com>
Date: 2021-11-13 (Sat, 13 Nov 2021)

Changed paths:
M checker/src/main/java/org/checkerframework/checker/mustcall/MustCallAnnotatedTypeFactory.java
M checker/src/main/java/org/checkerframework/checker/resourceleak/MustCallConsistencyAnalyzer.java
A checker/tests/resourceleak/TryWithResourcesFP.java
A checker/tests/resourceleak/TryWithResourcesMultiResources.java

Log Message:
-----------
Fix false positive in Resource Leak Checker related to try-with-resources (#4959)

RLC reported a false positive for this [line](https://github.com/kelloggm/wpi-many-tests-bibtex-clean/blob/703c0190ab7d7436a5be6e160667f194da44fdee/src/main/java/org/plumelib/bibtex/BibtexClean.java#L60-L61). That was because assignments to resource variables are handled in Must Call Checker which doesn't have any information about resource aliases. This PR removes the set of rhs obligations if lhs is a resource variable and must call type of rhs only contains `close()` method.


Reply all
Reply to author
Forward
0 new messages