SONARJAVA-6514 Fix S2093 FN: JDK 26 autoclosables#5700
Conversation
bdab809 to
d8f653a
Compare
81448cd to
8c9e3cb
Compare
|
Code Review ✅ Approved 2 resolved / 2 findingsUpdates TryWithResourcesCheck to identify new AutoCloseable types introduced in JDK 26 and expands test coverage to include these resources. All previously noted gaps in test coverage have been addressed. ✅ 2 resolved✅ Quality: Partial test coverage of new JDK 26 autocloseable matchers
✅ Quality: JDK 26 autocloseable matchers only partially covered by tests
OptionsAuto-apply is off → Gitar will not commit updates to this branch. Comment with these commands to change:
Was this helpful? React with 👍 / 👎 | Gitar |




JDK26 updates four objects to implement AutoClosable, and one to implement Closable (which transitively implements AutoClosable).
The
JDK26-JDK25API diff can be seen here.Relevant types that now implement AutoClosable:
Summary by Gitar
TryWithResourcesCheckto identify newAutoCloseabletypes introduced in Java 26, such asProcessand variousjava.sqlobjects.TryWithResourcesCheck_java_26test suite to verify detection of these resources in Java 26 projects.This will update automatically on new commits.