正在加载图片...
Bad smell ●Hand| e-Bad smell Ignored checked exception public void writeFile(string fileName, String datat Writer writer= null try i / may throw an ioException * writer= new FileWriter(fileName) may throw an IOEXception * writer. write(data) catch(IOEXception e)r/TO Do*/ finally * code for cleanup*/Bad Smell Handle——Bad Smell:  Ignored checked exception public void writeFile(String fileName, String data){ Writer writer = null; try { /* may throw an IOException */ writer = new FileWriter(fileName); /* may throw an IOException */ writer.write(data); } catch (IOException e) ){ /* TO DO */ } finally {/* code for cleanup */} }
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有