Metadata

When

May 16th and 20th 2011

Where

Copenhagen, Denmark

Participants

  • Paul King
  • Dierk König
  • Guillaume Laforge
  • Jochen Theodorou
  • Andrew Eisenberg
  • Andres Almiray
  • Peter Ledbrook
  • Burt Beckwith

Topics discussed

Try with resource brainstorming

try (
    FileReader reader = new FileReader();
    OutputStream stream = new OutputStream();
) {
    // do stuff
}

file.withReader {}

anything.withCloseable {}
[].withCloseable {}

autoClose(reader, writer) {
   reader = new FileReader()
   writer = new Writer() 
}

autoClose({ new FileReader() }, { new Writer() }) { reader, writer -> }
autoClose(reader = new FileReader(); new Writer(reader)) { reader, writer -> }

autoClose {
   reader = new FileReader()
   writer = new Writer() 
} with { }