Since we already require JDK 1.7 to compile NetBeans platform, FileLock class could finally implement AutoCloseable to nicely play in try-with-resources clauses.
Created attachment 149888 [details]
Y01 "As JDK 1.7 is required, the FileLock can implement AutoCloseable" - nice explanation of the motivation, but I guess it belongs more into the review issue than into the change description. Just state the fact it implements the interface to be usable in try/catch/with/resources.
Y02 Adding final method can be seen as binary incompatible change. Unlikely to cause harm, but consider non-final close() method.
Y03 Change one test in the TCK to use the close() method instead of releaseLock(), please.
Created attachment 149892 [details]
Revised patch with Y01-3
If there is no further input, I'll integrate on 29/10
Integrated into 'main-silver', will be available in build *201411210001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
User: Svata Dedic <firstname.lastname@example.org>
Log: #247915: implemented AutoCloseable support