diff options
author | Ram Koya <rk541m@att.com> | 2018-07-24 16:41:42 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2018-07-24 16:41:42 +0000 |
commit | cf00aaa94878184b0582fb52a276980908feed79 (patch) | |
tree | 2d83471830314bd927468b7dcafcd1c203b9789a /src/main/java/com/att/nsa | |
parent | edeee1d6e9fd857c8fb9b8622633fee43efb00e2 (diff) | |
parent | 3adbaf77da6c0834e38f971f8ca684862eefa929 (diff) |
Merge "Use try-with-resources"
Diffstat (limited to 'src/main/java/com/att/nsa')
-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(); |