aboutsummaryrefslogtreecommitdiffstats
path: root/src/main
diff options
context:
space:
mode:
authorRam Koya <rk541m@att.com>2018-07-24 16:41:42 +0000
committerGerrit Code Review <gerrit@onap.org>2018-07-24 16:41:42 +0000
commitcf00aaa94878184b0582fb52a276980908feed79 (patch)
tree2d83471830314bd927468b7dcafcd1c203b9789a /src/main
parentedeee1d6e9fd857c8fb9b8622633fee43efb00e2 (diff)
parent3adbaf77da6c0834e38f971f8ca684862eefa929 (diff)
Merge "Use try-with-resources"
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/com/att/nsa/mr/dme/client/PreferredRouteReplyHandler.java4
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();