@SuppressFBWarnings(value = "OS_OPEN_STREAM", justification = "False positive") private void loadServiceFile(URL serviceFile) { InputStream is = null; try { is = serviceFile.openStream(); BufferedReader reader = new BufferedReader(new InputStreamReader(is, "UTF-8")); String serviceClassName = null; int i = 0; while ((serviceClassName = reader.readLine()) != null) { i++; serviceClassName = trim(serviceClassName); if (serviceClassName.length() > 0) { loadService(serviceClassName, serviceFile, i); } } } catch (IOException e) { throw new RuntimeException("Could not read services file " + serviceFile, e); } finally { if (is != null) { try { is.close(); } catch (IOException e) { throw new RuntimeException("Could not close services file " + serviceFile, e); } } } }
@SuppressFBWarnings(value = "OS_OPEN_STREAM", justification = "False positive") private void loadServiceFile(URL serviceFile) { InputStream is = null; try { is = serviceFile.openStream(); BufferedReader reader = new BufferedReader(new InputStreamReader(is, "UTF-8")); String serviceClassName = null; int i = 0; while ((serviceClassName = reader.readLine()) != null) { i++; serviceClassName = trim(serviceClassName); if (serviceClassName.length() > 0) { loadService(serviceClassName, serviceFile, i); } } } catch (IOException e) { throw new RuntimeException("Could not read services file " + serviceFile, e); } finally { if (is != null) { try { is.close(); } catch (IOException e) { throw new RuntimeException("Could not close services file " + serviceFile, e); } } } }
@SuppressFBWarnings(value = "OS_OPEN_STREAM", justification = "False positive") private void loadServiceFile(URL serviceFile) { InputStream is = null; try { is = serviceFile.openStream(); BufferedReader reader = new BufferedReader(new InputStreamReader(is, "UTF-8")); String serviceClassName = null; int i = 0; while ((serviceClassName = reader.readLine()) != null) { i++; serviceClassName = trim(serviceClassName); if (serviceClassName.length() > 0) { loadService(serviceClassName, serviceFile, i); } } } catch (IOException e) { throw new RuntimeException("Could not read services file " + serviceFile, e); } finally { if (is != null) { try { is.close(); } catch (IOException e) { throw new RuntimeException("Could not close services file " + serviceFile, e); } } } }
@SuppressFBWarnings(value = "OS_OPEN_STREAM", justification = "False positive") private void loadServiceFile(URL serviceFile) { InputStream is = null; try { is = serviceFile.openStream(); BufferedReader reader = new BufferedReader(new InputStreamReader(is, "UTF-8")); String serviceClassName = null; int i = 0; while ((serviceClassName = reader.readLine()) != null) { i++; serviceClassName = trim(serviceClassName); if (serviceClassName.length() > 0) { loadService(serviceClassName, serviceFile, i); } } } catch (IOException e) { throw new RuntimeException("Could not read services file " + serviceFile, e); } finally { if (is != null) { try { is.close(); } catch (IOException e) { throw new RuntimeException("Could not close services file " + serviceFile, e); } } } }
@SuppressFBWarnings(value = "OS_OPEN_STREAM", justification = "False positive") private void loadServiceFile(URL serviceFile) { InputStream is = null; try { is = serviceFile.openStream(); BufferedReader reader = new BufferedReader(new InputStreamReader(is, "UTF-8")); String serviceClassName = null; int i = 0; while ((serviceClassName = reader.readLine()) != null) { i++; serviceClassName = trim(serviceClassName); if (serviceClassName.length() > 0) { loadService(serviceClassName, serviceFile, i); } } } catch (IOException e) { throw new RuntimeException("Could not read services file " + serviceFile, e); } finally { if (is != null) { try { is.close(); } catch (IOException e) { throw new RuntimeException("Could not close services file " + serviceFile, e); } } } }
@SuppressFBWarnings(value = "OS_OPEN_STREAM", justification = "False positive") private void loadServiceFile(URL serviceFile) { InputStream is = null; try { is = serviceFile.openStream(); BufferedReader reader = new BufferedReader(new InputStreamReader(is, "UTF-8")); String serviceClassName = null; int i = 0; while ((serviceClassName = reader.readLine()) != null) { i++; serviceClassName = trim(serviceClassName); if (serviceClassName.length() > 0) { loadService(serviceClassName, serviceFile, i); } } } catch (IOException e) { // FIXME: correct exception throw new RuntimeException("Could not read services file " + serviceFile); } finally { if (is != null) { try { is.close(); } catch (IOException e) { // FIXME: correct exception throw new RuntimeException("Could not close services file " + serviceFile, e); } } } }