#611 OneStatementPerLine should tolerate the Java 7 try-with-resources

Future
closed
nobody
None
1
2014-07-30
2013-07-04
Eric Lewis
No

The OneStatementPerLine keeps the Java code tidy. However, in Java 7, the new try-with-resources was added, which implies that several Closeable resources can be created within one try statement:

try (Reader xml = toXML(data); Reader xslt = createXSLReader(); WritableByteBuffer out = createOutputBuffer();) {
   ...
} catch (final IOException e) {
   ...
}

OneStatementPerLine should be configurable to tolerate this use case. Or as a more generic solution, allow regexes for exceptions to the rule.

Discussion

  • Ivan Sopov

    Ivan Sopov - 2013-11-17
    • status: open --> closed
     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks