Fix checkstyle whitespace issues - WHITESPACE ONLY
Change-Id: Ic205c1afd639c6008d61d9de95cb764eeb6238ca
diff --git a/src/main/java/net/onrc/onos/apps/bgproute/BgpRouteResourceSynch.java b/src/main/java/net/onrc/onos/apps/bgproute/BgpRouteResourceSynch.java
index 5e33bc5..20fc71b 100644
--- a/src/main/java/net/onrc/onos/apps/bgproute/BgpRouteResourceSynch.java
+++ b/src/main/java/net/onrc/onos/apps/bgproute/BgpRouteResourceSynch.java
@@ -9,63 +9,65 @@
public class BgpRouteResourceSynch extends ServerResource {
-
- protected final static Logger log = LoggerFactory
+
+ protected final static Logger log = LoggerFactory
.getLogger(BgpRouteResource.class);
-
- @Post
- public String store(String fmJson) {
-
- IBgpRouteService bgpRoute = (IBgpRouteService)getContext().getAttributes().
+
+ @Post
+ public String store(String fmJson) {
+
+ IBgpRouteService bgpRoute = (IBgpRouteService) getContext().getAttributes().
get(IBgpRouteService.class.getCanonicalName());
-
- String router_id = (String) getRequestAttributes().get("routerid");
- String prefix = (String) getRequestAttributes().get("prefix");
- String mask = (String) getRequestAttributes().get("mask");
- String nexthop = (String) getRequestAttributes().get("nexthop");
-
- try{
-
- String BGPdRestIp = bgpRoute.getBGPdRestIp();
-
- //bgpdRestIp includes port number, such as 1.1.1.1:8080
- RestClient.post("http://"+BGPdRestIp+"/wm/bgp/"+router_id+"/"+prefix+"/"+mask+"/"+nexthop);
- }catch(Exception e)
- {e.printStackTrace();}
-
- String reply = "";
- reply = "[POST: " + prefix + "/" + mask + ":" + nexthop + "/synch]";
- log.info(reply);
-
- return reply + "\n";
-
-
- }
-
- @Delete
- public String delete(String fmJson) {
- IBgpRouteService bgpRoute = (IBgpRouteService)getContext().getAttributes().
- get(IBgpRouteService.class.getCanonicalName());
-
- String routerId = (String) getRequestAttributes().get("routerid");
- String prefix = (String) getRequestAttributes().get("prefix");
- String mask = (String) getRequestAttributes().get("mask");
- String nextHop = (String) getRequestAttributes().get("nexthop");
-
- String reply = "";
- try{
- String BGPdRestIp = bgpRoute.getBGPdRestIp();
-
- RestClient.delete("http://"+BGPdRestIp+"/wm/bgp/"+routerId+"/"+prefix+"/"+mask+"/"+nextHop);
-
- }catch(Exception e)
- {e.printStackTrace();}
-
- reply =reply + "[DELE: " + prefix + "/" + mask + ":" + nextHop + "/synch]";
-
- log.info(reply);
+
+ String router_id = (String) getRequestAttributes().get("routerid");
+ String prefix = (String) getRequestAttributes().get("prefix");
+ String mask = (String) getRequestAttributes().get("mask");
+ String nexthop = (String) getRequestAttributes().get("nexthop");
+
+ try {
+
+ String BGPdRestIp = bgpRoute.getBGPdRestIp();
+
+ //bgpdRestIp includes port number, such as 1.1.1.1:8080
+ RestClient.post("http://" + BGPdRestIp + "/wm/bgp/" + router_id + "/" + prefix + "/" + mask + "/" + nexthop);
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+
+ String reply = "";
+ reply = "[POST: " + prefix + "/" + mask + ":" + nexthop + "/synch]";
+ log.info(reply);
+
+ return reply + "\n";
- return reply + "\n";
- }
+ }
+
+ @Delete
+ public String delete(String fmJson) {
+ IBgpRouteService bgpRoute = (IBgpRouteService) getContext().getAttributes().
+ get(IBgpRouteService.class.getCanonicalName());
+
+ String routerId = (String) getRequestAttributes().get("routerid");
+ String prefix = (String) getRequestAttributes().get("prefix");
+ String mask = (String) getRequestAttributes().get("mask");
+ String nextHop = (String) getRequestAttributes().get("nexthop");
+
+ String reply = "";
+ try {
+ String BGPdRestIp = bgpRoute.getBGPdRestIp();
+
+ RestClient.delete("http://" + BGPdRestIp + "/wm/bgp/" + routerId + "/" + prefix + "/" + mask + "/" + nextHop);
+
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+
+ reply = reply + "[DELE: " + prefix + "/" + mask + ":" + nextHop + "/synch]";
+
+ log.info(reply);
+
+
+ return reply + "\n";
+ }
}