aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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();