Try-with-resources в Java 7?

В новом синтаксисе Try-with-Resources в Java 7 мне нужно беспокоиться о порядке ресурсов?

try (InputStream in = loadInput(...); // <--- can these be in any order?
     OutputStream out = createOutput(...) ){
    copy(in, out);
}
catch (Exception e) {
    // Problem reading and writing streams.
    // Or problem opening one of them.
    // If compound error closing streams occurs, it will be recorded on this exception 
    // as a "suppressedException".
} 
5
задан citizen conn 13 July 2011 в 03:07
поделиться