-
Notifications
You must be signed in to change notification settings - Fork 130
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
False positive warning "Potential resource leak" inside "try with resources" #2642
Comments
Fun fact: it worked at least in 3.8.2 Eclipse on Java 1.7 :-) |
This looks spooky on first glance:
Not allocating the writer but calling We do have provision for this situation, see |
OK, I see it now where AI hallucinates :-). Compiler assumes the return value has to be closed... |
resources" Traverse supers to detect fluent methods Test: + fine tune test230_sourcepath_vs_classpath to avoid superclass loading Fixes eclipse-jdt#2642
Don't worry: with AI in the picture any causalities between input program and warnings would be much more obscure.. ;-P |
resources" fix regression on windows by avoiding test program execution fixes eclipse-jdt#2642
…ources" (eclipse-jdt#2718) Traverse supers to detect fluent methods Test: + fine tune test230_sourcepath_vs_classpath to avoid superclass loading Fixes eclipse-jdt#2642
…ources" (eclipse-jdt#2718) Traverse supers to detect fluent methods Test: + fine tune test230_sourcepath_vs_classpath to avoid superclass loading Fixes eclipse-jdt#2642
…ources" (eclipse-jdt#2725) fix regression on windows by avoiding test program execution fixes eclipse-jdt#2642
Given this example and enabled
org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=warning
option in.settings/org.eclipse.jdt.core.prefs
we report false positive warning
Potential resource leak: '<unassigned Closeable value>' may not be closed
.Of course this is option is not enabled by default, and of course it is potential, but here we have undoubtedly closed writer, so not idea where the "potential" warning is coming from.
@stephan-herrmann : FYI.
The text was updated successfully, but these errors were encountered: