Skip to content

Instantly share code, notes, and snippets.

@cben
Created March 8, 2015 12:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cben/6e092536e8f2072ab83f to your computer and use it in GitHub Desktop.
Save cben/6e092536e8f2072ab83f to your computer and use it in GitHub Desktop.
Question about altenate style for http://stackoverflow.com/a/8981602/239657
fr = null;
try {
FileReader fr = new FileReader(file);
try {
BufferedReader br = new BufferedReader(fr);
String line = null;
} finally {
// [I'm not sure swallowing errors here is good but that's an unrelated question -- Beni]
try {
fr.close();
} catch (IOException e) {
// This is unrecoverable. Just report it and move on
e.printStackTrace();
}
}
} catch (FileNotFoundException e) {
e.printStackTrace();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment