This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
The following code does not compile because an unreported java.io.IOException is thrown by the synthetic call to is.close(), public void method() throws FileNotFoundException { @Cleanup final InputStream is = new FileInputStream("filename"); } The ide shows an error badge at line 1 of the source file.
@Cleanup is actually @lombok.Cleanup
The close method invocation has position -1 (which is generally used to mark things that are "synthetic").
This old bug may not be relevant anymore. If you can still reproduce it in 8.2 development builds please reopen this issue. Thanks for your cooperation, NetBeans IDE 8.2 Release Boss