public class FixedSample { public void fixedSampleMethod(File file) { BufferedReader reader = null; try { reader = new BufferedReader(new FileReader(file)); reader.read(); } catch (FileNotFoundException fnfe) { fnfe.printStackTrace(); } catch (IOException ioe) { ioe.printStackTrace(); } finally { try { reader.close(); } catch(IOException ioe2) { ioe2.printStackTrace(); } } } }