diff options
author | Arindam Mondal <arind.mondal@samsung.com> | 2018-07-10 16:45:42 +0900 |
---|---|---|
committer | ONAP <arind.mondal@samsung.com> | 2018-07-10 16:55:24 +0900 |
commit | 3adbaf77da6c0834e38f971f8ca684862eefa929 (patch) | |
tree | b824da840d89afe585c01938212311ca3b7c1f6c /src/main | |
parent | 6953e6169bb7b92a41a902e3ad932c88aab38bb5 (diff) |
Use try-with-resources
Issue-ID: DMAAP-539
Change-Id: Ic2c2eeb4ada3e05de695d108de37129a8aa39ad1
Signed-off-by: Arindam Mondal <arind.mondal@samsung.com>
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/java/com/att/nsa/mr/dme/client/PreferredRouteReplyHandler.java | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/main/java/com/att/nsa/mr/dme/client/PreferredRouteReplyHandler.java b/src/main/java/com/att/nsa/mr/dme/client/PreferredRouteReplyHandler.java index 26d74ee..0878359 100644 --- a/src/main/java/com/att/nsa/mr/dme/client/PreferredRouteReplyHandler.java +++ b/src/main/java/com/att/nsa/mr/dme/client/PreferredRouteReplyHandler.java @@ -60,9 +60,7 @@ public class PreferredRouteReplyHandler implements DME2ExchangeReplyHandler { } public void routeWriter(String routeKey, String routeValue){ - try{ - - FileWriter routeWriter=new FileWriter(new File (MRSimplerBatchPublisher.routerFilePath)); + try(FileWriter routeWriter=new FileWriter(new File (MRSimplerBatchPublisher.routerFilePath))){ routeWriter.write(routeKey+"="+routeValue); routeWriter.close(); |