Fixed Bugs Detected by SonarCloud
[holmes/common.git] / holmes-actions / src / main / java / org / onap / holmes / common / api / stat / Alarm.java
index b6cfc06..6d9d602 100644 (file)
@@ -1,5 +1,5 @@
 /**\r
- * Copyright 2017 ZTE Corporation.\r
+ * Copyright 2017-2020 ZTE Corporation.\r
  *\r
  * Licensed under the Apache License, Version 2.0 (the "License");\r
  * you may not use this file except in compliance with the License.\r
@@ -78,28 +78,6 @@ public class Alarm implements AplusData, Cloneable, Serializable {
         linkIdNodeIdxMap.put(linkId, index);\r
     }\r
 \r
-    /**\r
-     * Comparison of the location of different links: 999 the same link: the location of the node\r
-     * number less than otherIdIdx in the location of the number (in the otherIdIdx upstream):-1,\r
-     * the same link: the node position number is equal to the number of position in the otherIdIdx\r
-     * (in the same site otherIdIdx):0, the same link: the node location number is greater than the\r
-     * number of locations in otherIdIdx (otherIdIdx) with the site):1,\r
-     */\r
-    public int CompareLinkPosition(Map<Integer, Integer> otherIdIdx) {\r
-        Set<Integer> myIdSet = new HashSet<>();\r
-        myIdSet.addAll(this.linkIdNodeIdxMap.keySet());\r
-        myIdSet.retainAll(otherIdIdx.keySet());\r
-\r
-        if (myIdSet.isEmpty()) {\r
-            return 999;\r
-        }\r
-\r
-        for (int tempLinkId : myIdSet) {\r
-            return this.linkIdNodeIdxMap.get(tempLinkId) - otherIdIdx.get(tempLinkId);\r
-        }\r
-        return 999;\r
-    }\r
-\r
     public boolean containNode(int linkId, int index) {\r
        return linkIdNodeIdxMap.containsKey(linkId) && linkIdNodeIdxMap.get(linkId) == index;\r
     }\r