Fix Sonar errors: public data members in classes

Change-Id: I7aca37d5553436167ac6e7b2206392f88bddc118
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
+}