Fix Sonar errors: public data members in classes

Change-Id: I7aca37d5553436167ac6e7b2206392f88bddc118
diff --git a/protocols/ospf/ctl/src/main/java/org/onosproject/ospf/controller/area/OspfAreaAddressRangeImpl.java b/protocols/ospf/ctl/src/main/java/org/onosproject/ospf/controller/area/OspfAreaAddressRangeImpl.java
index e0636d7..1337203 100644
--- a/protocols/ospf/ctl/src/main/java/org/onosproject/ospf/controller/area/OspfAreaAddressRangeImpl.java
+++ b/protocols/ospf/ctl/src/main/java/org/onosproject/ospf/controller/area/OspfAreaAddressRangeImpl.java
@@ -28,9 +28,9 @@
  */
 public class OspfAreaAddressRangeImpl implements OspfAreaAddressRange {
 
-    public Ip4Address ipAddress;
-    public String mask;
-    public boolean advertise;
+    private Ip4Address ipAddress;
+    private String mask;
+    private boolean advertise;
 
     /**
      * Gets the IP address.
@@ -111,4 +111,4 @@
                 .add("advertise", advertise)
                 .toString();
     }
-}
\ No newline at end of file
+}
diff --git a/protocols/ospf/ctl/src/main/java/org/onosproject/ospf/controller/impl/TopologyForDeviceAndLinkImpl.java b/protocols/ospf/ctl/src/main/java/org/onosproject/ospf/controller/impl/TopologyForDeviceAndLinkImpl.java
index 86dd2cf..67edc39 100644
--- a/protocols/ospf/ctl/src/main/java/org/onosproject/ospf/controller/impl/TopologyForDeviceAndLinkImpl.java
+++ b/protocols/ospf/ctl/src/main/java/org/onosproject/ospf/controller/impl/TopologyForDeviceAndLinkImpl.java
@@ -606,7 +606,7 @@
             routerLsa.lsType();
             List<OspfLsaLink> ospfLsaLinkList = routerLsa.routerLink();
             for (OspfLsaLink link : ospfLsaLinkList) {
-                if (link.linkType == 1 || link.linkType == 2) {
+                if (link.linkType() == 1 || link.linkType() == 2) {
                     if ((routerLsa.advertisingRouter().equals(ospfArea.routerId())) ||
                             (link.equals(ospfArea.routerId()))) {
                         log.debug("OspfInterface information will not display in web ");
@@ -641,7 +641,7 @@
             RouterLsa routerLsa = (RouterLsa) ospfLsa;
             List<OspfLsaLink> ospfLsaLinkList = routerLsa.routerLink();
             for (OspfLsaLink link : ospfLsaLinkList) {
-                if (link.linkType == 1 || link.linkType == 2) {
+                if (link.linkType() == 1 || link.linkType() == 2) {
                     if ((routerLsa.advertisingRouter().equals(ospfArea.routerId())) ||
                             (link.equals(ospfArea.routerId()))) {
                         log.debug("OspfInterface information will not display in web ");
@@ -666,4 +666,4 @@
         }
         return removedLinkList;
     }
-}
\ No newline at end of file
+}