Severity | 1 |
---|---|
Enabled | yes |
Waivable | |
Violation |
public int getFirstByte(final String fName) { try { InputStream is = new FileInputStream(fName); return is.read(); } catch (IOException e) { e.printStackTrace(); return 0; } } |
Fix |
public int getFirstByte(final String fName)throws HammurapiTestCasesException { try { InputStream is = new FileInputStream(fName); return is.read(); } catch (IOException e) { logger.error(FILE_ERROR_TXT, e); throw new HammurapiTestCasesException(e); } } |