|
37 | 37 | */ |
38 | 38 | public final class SeerApi { |
39 | 39 |
|
40 | | - private DiseaseService _diseaseService; |
41 | | - private GlossaryService _glossaryService; |
42 | | - private MphService _mphService; |
43 | | - private NaaccrService _naaccrService; |
44 | | - private NdcService _ndcService; |
45 | | - private RxService _rxService; |
46 | | - private SiteRecodeService _siteRecodeService; |
47 | | - private StagingService _stagingService; |
48 | | - private SurgeryService _surgeryService; |
49 | | - private HcpcsService _hcpcsService; |
| 40 | + private final DiseaseService _diseaseService; |
| 41 | + private final GlossaryService _glossaryService; |
| 42 | + private final MphService _mphService; |
| 43 | + private final NaaccrService _naaccrService; |
| 44 | + private final NdcService _ndcService; |
| 45 | + private final RxService _rxService; |
| 46 | + private final SiteRecodeService _siteRecodeService; |
| 47 | + private final StagingService _stagingService; |
| 48 | + private final SurgeryService _surgeryService; |
| 49 | + private final HcpcsService _hcpcsService; |
50 | 50 |
|
51 | 51 | /** |
52 | 52 | * Creates a client API root object |
@@ -210,31 +210,20 @@ public static class Builder { |
210 | 210 |
|
211 | 211 | /** |
212 | 212 | * Return a list of user properties from the local .seerapi file |
213 | | - * @return |
| 213 | + * @return Properties object |
214 | 214 | */ |
215 | 215 | private Properties getProperties() { |
216 | 216 | Properties props = new Properties(); |
217 | 217 |
|
218 | 218 | File config = new File(System.getProperty("user.home"), ".seerapi"); |
219 | 219 | if (config.exists()) { |
220 | | - FileInputStream in = null; |
221 | 220 |
|
222 | | - try { |
223 | | - in = new FileInputStream(config); |
| 221 | + try (FileInputStream in = new FileInputStream(config)) { |
224 | 222 | props.load(in); |
225 | 223 | } |
226 | 224 | catch (IOException e) { |
227 | 225 | // error reading |
228 | 226 | } |
229 | | - finally { |
230 | | - try { |
231 | | - if (in != null) |
232 | | - in.close(); |
233 | | - } |
234 | | - catch (IOException e) { |
235 | | - // do nothing if error closing stream |
236 | | - } |
237 | | - } |
238 | 227 | } |
239 | 228 |
|
240 | 229 | return props; |
|
0 commit comments