more error-prone issue fix
Change-Id: I49f2cc0459cfddddc6a99e2ebb8ad52d547e2909
diff --git a/apps/configsync-netconf/pom.xml b/apps/configsync-netconf/pom.xml
index 4f832bc..7a23711 100644
--- a/apps/configsync-netconf/pom.xml
+++ b/apps/configsync-netconf/pom.xml
@@ -124,18 +124,6 @@
</dependencies>
<build>
- <pluginManagement>
- <plugins>
-
- <plugin>
- <groupId>org.apache.karaf.tooling</groupId>
- <artifactId>karaf-maven-plugin</artifactId>
- <version>3.0.5</version>
- <extensions>true</extensions>
- </plugin>
-
- </plugins>
- </pluginManagement>
<plugins>
<plugin>
diff --git a/apps/configsync/pom.xml b/apps/configsync/pom.xml
index 270dda3..1376461 100644
--- a/apps/configsync/pom.xml
+++ b/apps/configsync/pom.xml
@@ -124,18 +124,6 @@
</dependencies>
<build>
- <pluginManagement>
- <plugins>
-
- <plugin>
- <groupId>org.apache.karaf.tooling</groupId>
- <artifactId>karaf-maven-plugin</artifactId>
- <version>3.0.5</version>
- <extensions>true</extensions>
- </plugin>
-
- </plugins>
- </pluginManagement>
<plugins>
<plugin>
diff --git a/apps/evpn-route-service/api/src/main/java/org/onosproject/evpnrouteservice/EvpnInstanceRoute.java b/apps/evpn-route-service/api/src/main/java/org/onosproject/evpnrouteservice/EvpnInstanceRoute.java
index 3e98531..ca0c8bd8 100644
--- a/apps/evpn-route-service/api/src/main/java/org/onosproject/evpnrouteservice/EvpnInstanceRoute.java
+++ b/apps/evpn-route-service/api/src/main/java/org/onosproject/evpnrouteservice/EvpnInstanceRoute.java
@@ -198,7 +198,7 @@
EvpnInstanceRoute that = (EvpnInstanceRoute) other;
- return Objects.equals(prefix, prefix)
+ return Objects.equals(prefix, that.prefix)
&& Objects.equals(nextHop, that.nextHop)
&& Objects.equals(evpnName, that.evpnName)
&& Objects.equals(rd, that.rd)
diff --git a/apps/evpn-route-service/api/src/main/java/org/onosproject/evpnrouteservice/EvpnRoute.java b/apps/evpn-route-service/api/src/main/java/org/onosproject/evpnrouteservice/EvpnRoute.java
index 9449093..0f025d3 100644
--- a/apps/evpn-route-service/api/src/main/java/org/onosproject/evpnrouteservice/EvpnRoute.java
+++ b/apps/evpn-route-service/api/src/main/java/org/onosproject/evpnrouteservice/EvpnRoute.java
@@ -115,7 +115,6 @@
checkNotNull(prefixMac);
checkNotNull(prefix);
//checkNotNull(nextHop); //next hop can be null in case of MP un reach.
- checkNotNull(labelToInt);
this.source = checkNotNull(source);
this.prefix = prefix;
this.prefixMac = prefixMac;
@@ -258,7 +257,7 @@
EvpnRoute that = (EvpnRoute) other;
- return Objects.equals(prefixMac, prefixMac)
+ return Objects.equals(prefixMac, that.prefixMac)
&& Objects.equals(prefix, that.prefix)
&& Objects.equals(nextHop, that.nextHop)
&& Objects.equals(this.rd, that.rd)
diff --git a/apps/evpn-route-service/app/src/main/java/org/onosproject/evpnrouteservice/impl/EvpnRouteManager.java b/apps/evpn-route-service/app/src/main/java/org/onosproject/evpnrouteservice/impl/EvpnRouteManager.java
index 19e6311..28abb7d 100644
--- a/apps/evpn-route-service/app/src/main/java/org/onosproject/evpnrouteservice/impl/EvpnRouteManager.java
+++ b/apps/evpn-route-service/app/src/main/java/org/onosproject/evpnrouteservice/impl/EvpnRouteManager.java
@@ -81,7 +81,9 @@
@Deactivate
protected void deactivate() {
evpnRouteStore.unsetDelegate(evpnRouteStoreDelegate);
- listeners.values().forEach(EvpnListenerQueue::stop);
+ synchronized (this) {
+ listeners.values().forEach(EvpnListenerQueue::stop);
+ }
}
/**
@@ -148,6 +150,7 @@
}
+ @Override
public Collection<EvpnRouteTableId> getRouteTables() {
return evpnRouteStore.getRouteTables();
}
diff --git a/apps/graphitemetrics/src/test/java/org/onosproject/graphitemetrics/GraphiteMetricsReporterTest.java b/apps/graphitemetrics/src/test/java/org/onosproject/graphitemetrics/GraphiteMetricsReporterTest.java
index 5ecaf28..5036964 100644
--- a/apps/graphitemetrics/src/test/java/org/onosproject/graphitemetrics/GraphiteMetricsReporterTest.java
+++ b/apps/graphitemetrics/src/test/java/org/onosproject/graphitemetrics/GraphiteMetricsReporterTest.java
@@ -49,13 +49,6 @@
}
/**
- * Tears down graphite metrics reporter instance.
- */
- public void tearDown() {
- gmr.deactivate();
- }
-
- /**
* Tests whether the containsName method can always return the correct result
* with the given metric name and a set of prefixes.
*/
diff --git a/apps/influxdbmetrics/src/main/java/org/onosproject/influxdbmetrics/DefaultInfluxMetric.java b/apps/influxdbmetrics/src/main/java/org/onosproject/influxdbmetrics/DefaultInfluxMetric.java
index f3ce81a..bcee522 100644
--- a/apps/influxdbmetrics/src/main/java/org/onosproject/influxdbmetrics/DefaultInfluxMetric.java
+++ b/apps/influxdbmetrics/src/main/java/org/onosproject/influxdbmetrics/DefaultInfluxMetric.java
@@ -67,7 +67,6 @@
@Override
public InfluxMetric build() {
- checkNotNull(oneMinRate, ONE_MIN_RATE_MSG);
checkNotNull(timestamp, TIMESTAMP_MSG);
return new DefaultInfluxMetric(oneMinRate, parseTime(timestamp));
diff --git a/apps/netconf/client/pom.xml b/apps/netconf/client/pom.xml
index e37a3c5..eba0375 100644
--- a/apps/netconf/client/pom.xml
+++ b/apps/netconf/client/pom.xml
@@ -125,18 +125,6 @@
</dependencies>
<build>
- <pluginManagement>
- <plugins>
-
- <plugin>
- <groupId>org.apache.karaf.tooling</groupId>
- <artifactId>karaf-maven-plugin</artifactId>
- <version>3.0.5</version>
- <extensions>true</extensions>
- </plugin>
-
- </plugins>
- </pluginManagement>
<plugins>
<plugin>
diff --git a/apps/netconf/client/src/main/java/org/onosproject/netconf/client/EventData.java b/apps/netconf/client/src/main/java/org/onosproject/netconf/client/EventData.java
deleted file mode 100644
index 0dce327..0000000
--- a/apps/netconf/client/src/main/java/org/onosproject/netconf/client/EventData.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Copyright 2017-present Open Networking Foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.onosproject.netconf.client;
-
-import org.onosproject.config.DynamicConfigEvent;
-import org.onosproject.net.DeviceId;
-import org.onosproject.yang.model.ResourceId;
-
-
-/**
- * Event details.
- */
-public class EventData {
-
- private DeviceId devId;
- private ResourceId key;
- private DynamicConfigEvent.Type type;
-
- /**
- * Creates an instance of EventData.
- *
- * @param devId device id
- * @param key device key
- * @param type event type
- */
- public EventData(DeviceId devId, ResourceId key, DynamicConfigEvent.Type type) {
- devId = devId;
- key = key;
- type = type;
- }
-
- public DeviceId getDevId() {
- return devId;
- }
-
- public ResourceId getKey() {
- return key;
- }
-
- public DynamicConfigEvent.Type getType() {
- return type;
- }
-}
\ No newline at end of file
diff --git a/apps/pce/app/src/main/java/org/onosproject/pce/pceservice/PceManager.java b/apps/pce/app/src/main/java/org/onosproject/pce/pceservice/PceManager.java
index 41d54c2..d1e3d66 100644
--- a/apps/pce/app/src/main/java/org/onosproject/pce/pceservice/PceManager.java
+++ b/apps/pce/app/src/main/java/org/onosproject/pce/pceservice/PceManager.java
@@ -398,7 +398,7 @@
//Log.info("computeExplicitPath :: finalComputedPath " + finalComputedPath);
if (finalComputedPath != null && !finalComputedPath.get(finalComputedPath.size() - 1).links()
- .contains((Link) info.value())) {
+ .contains(info.value())) {
finalComputedPath = null;
}
}
@@ -913,7 +913,6 @@
private boolean releaseSharedBwForNewTunnel(Path computedPath, double bandwidthConstraint,
SharedBandwidthConstraint shBwConstraint) {
checkNotNull(computedPath);
- checkNotNull(bandwidthConstraint);
double bwToAllocate;
Double additionalBwValue = null;
@@ -1071,7 +1070,6 @@
private boolean reserveBandwidth(Path computedPath, double bandwidthConstraint,
SharedBandwidthConstraint shBwConstraint) {
checkNotNull(computedPath);
- checkNotNull(bandwidthConstraint);
Resource resource = null;
double bwToAllocate = 0;
Map<Link, Double> linkMap = new HashMap<>();
diff --git a/apps/pce/pceweb/src/main/java/org/onosproject/pceweb/PceWebTopovMessageHandler.java b/apps/pce/pceweb/src/main/java/org/onosproject/pceweb/PceWebTopovMessageHandler.java
index a1a9a25..4306f61 100644
--- a/apps/pce/pceweb/src/main/java/org/onosproject/pceweb/PceWebTopovMessageHandler.java
+++ b/apps/pce/pceweb/src/main/java/org/onosproject/pceweb/PceWebTopovMessageHandler.java
@@ -772,7 +772,7 @@
private void findTunnelAndHighlights() {
Collection<Tunnel> tunnelSet = null;
Highlights highlights = new Highlights();
- paths.removeAll(paths);
+ paths.clear();
tunnelSet = tunnelService.queryTunnel(MPLS);
if (tunnelSet.size() == 0) {
log.warn("Tunnel does not exist");
@@ -819,7 +819,7 @@
*/
private void highlightsForTunnel(List<Tunnel> tunnels) {
Highlights highlights = new Highlights();
- paths.removeAll(paths);
+ paths.clear();
if (tunnels.isEmpty()) {
log.error("path does not exist");
diff --git a/apps/route-service/app/src/main/java/org/onosproject/routeservice/impl/RouteManager.java b/apps/route-service/app/src/main/java/org/onosproject/routeservice/impl/RouteManager.java
index 8914a1e..0dc5dbe 100644
--- a/apps/route-service/app/src/main/java/org/onosproject/routeservice/impl/RouteManager.java
+++ b/apps/route-service/app/src/main/java/org/onosproject/routeservice/impl/RouteManager.java
@@ -113,7 +113,9 @@
@Deactivate
protected void deactivate() {
routeMonitor.shutdown();
- listeners.values().forEach(ListenerQueue::stop);
+ synchronized (this) {
+ listeners.values().forEach(ListenerQueue::stop);
+ }
routeStore.unsetDelegate(delegate);
hostService.removeListener(hostListener);
@@ -176,6 +178,7 @@
return routeSets.stream().flatMap(r -> r.routes().stream()).collect(Collectors.toList());
}
+ @Override
public Collection<RouteTableId> getRouteTables() {
return routeStore.getRouteTables();
}
diff --git a/apps/routeradvertisement/src/main/java/org/onosproject/ra/RouterAdvertisementManager.java b/apps/routeradvertisement/src/main/java/org/onosproject/ra/RouterAdvertisementManager.java
index 5f31bdf..9f10728 100644
--- a/apps/routeradvertisement/src/main/java/org/onosproject/ra/RouterAdvertisementManager.java
+++ b/apps/routeradvertisement/src/main/java/org/onosproject/ra/RouterAdvertisementManager.java
@@ -160,14 +160,17 @@
private final Map<ConnectPoint, Map.Entry<ScheduledFuture<?>, List<InterfaceIpAddress>>> transmitters =
new LinkedHashMap<>();
+ // TODO: should consider using concurrent variants
@GuardedBy(value = "this")
private final Map<DeviceId, List<InterfaceIpAddress>> globalPrefixes = new LinkedHashMap<>();
@Override
- public ImmutableMap<DeviceId, List<InterfaceIpAddress>> getGlobalPrefixes() {
+ public synchronized ImmutableMap<DeviceId, List<InterfaceIpAddress>> getGlobalPrefixes() {
return ImmutableMap.copyOf(globalPrefixes);
}
+ @SuppressWarnings("GuardedBy")
+ @GuardedBy(value = "this")
private Function<Interface, Map.Entry<ConnectPoint, List<InterfaceIpAddress>>> prefixGenerator =
i -> {
Map.Entry<ConnectPoint, List<InterfaceIpAddress>> prefixEntry;
@@ -282,6 +285,7 @@
clearThreadPool();
}
+ @SuppressWarnings("GuardedBy")
// Loading global prefixes for devices from network configuration
private synchronized void loadGlobalPrefixConfig() {
globalPrefixes.clear();
@@ -507,6 +511,7 @@
solicitHostAddress = ipv6Address;
}
+ @Override
public void run() {
// Router Advertisement header filling. Please refer RFC-2461.
RouterAdvertisement ra = new RouterAdvertisement();
diff --git a/apps/tenbi/topology/pom.xml b/apps/tenbi/topology/pom.xml
index b3ac945..61b1453 100644
--- a/apps/tenbi/topology/pom.xml
+++ b/apps/tenbi/topology/pom.xml
@@ -62,4 +62,33 @@
</dependency>
</dependencies>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <compilerArgs>
+ <arg>-XepDisableAllChecks</arg>
+ <arg>-Xep:BetaApi:OFF</arg>
+ </compilerArgs>
+ </configuration>
+ <executions>
+ <execution>
+ <phase>compile</phase>
+ <goals>
+ <goal>compile</goal>
+ </goals>
+ <configuration>
+ <compilerArgs>
+ <arg>-XepDisableAllChecks</arg>
+ <arg>-Xep:BetaApi:OFF</arg>
+ </compilerArgs>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+
</project>
diff --git a/apps/tenbi/tunnel/pom.xml b/apps/tenbi/tunnel/pom.xml
index 2a64af3..2c114a7 100644
--- a/apps/tenbi/tunnel/pom.xml
+++ b/apps/tenbi/tunnel/pom.xml
@@ -90,6 +90,32 @@
</instructions>
</configuration>
</plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <compilerArgs>
+ <arg>-XepDisableAllChecks</arg>
+ <arg>-Xep:BetaApi:OFF</arg>
+ </compilerArgs>
+ </configuration>
+ <executions>
+ <execution>
+ <phase>compile</phase>
+ <goals>
+ <goal>compile</goal>
+ </goals>
+ <configuration>
+ <compilerArgs>
+ <arg>-XepDisableAllChecks</arg>
+ <arg>-Xep:BetaApi:OFF</arg>
+ </compilerArgs>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+
</plugins>
</build>
diff --git a/apps/tenbi/utils/pom.xml b/apps/tenbi/utils/pom.xml
index 817a6da..b15a235 100644
--- a/apps/tenbi/utils/pom.xml
+++ b/apps/tenbi/utils/pom.xml
@@ -51,4 +51,34 @@
<version>${project.version}</version>
</dependency>
</dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <compilerArgs>
+ <arg>-XepDisableAllChecks</arg>
+ <arg>-Xep:BetaApi:OFF</arg>
+ </compilerArgs>
+ </configuration>
+ <executions>
+ <execution>
+ <phase>compile</phase>
+ <goals>
+ <goal>compile</goal>
+ </goals>
+ <configuration>
+ <compilerArgs>
+ <arg>-XepDisableAllChecks</arg>
+ <arg>-Xep:BetaApi:OFF</arg>
+ </compilerArgs>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+
</project>
diff --git a/apps/tenbi/yangmodel/pom.xml b/apps/tenbi/yangmodel/pom.xml
index a38a441..2ad8679 100644
--- a/apps/tenbi/yangmodel/pom.xml
+++ b/apps/tenbi/yangmodel/pom.xml
@@ -44,6 +44,33 @@
<build>
<plugins>
+
+ <!-- FIXME: YANG tool generates problematic code -->
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <compilerArgs>
+ <arg>-XepDisableAllChecks</arg>
+ <arg>-Xep:BetaApi:OFF</arg>
+ </compilerArgs>
+ </configuration>
+ <executions>
+ <execution>
+ <phase>compile</phase>
+ <goals>
+ <goal>compile</goal>
+ </goals>
+ <configuration>
+ <compilerArgs>
+ <arg>-XepDisableAllChecks</arg>
+ <arg>-Xep:BetaApi:OFF</arg>
+ </compilerArgs>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+
<plugin>
<groupId>org.onosproject</groupId>
<artifactId>onos-yang-maven-plugin</artifactId>
diff --git a/apps/tetopology/app/src/main/java/org/onosproject/tetopology/management/impl/DistributedTeTopologyStore.java b/apps/tetopology/app/src/main/java/org/onosproject/tetopology/management/impl/DistributedTeTopologyStore.java
index a5bc555..c9a0b50 100644
--- a/apps/tetopology/app/src/main/java/org/onosproject/tetopology/management/impl/DistributedTeTopologyStore.java
+++ b/apps/tetopology/app/src/main/java/org/onosproject/tetopology/management/impl/DistributedTeTopologyStore.java
@@ -1316,7 +1316,7 @@
TeNodeKey myTeNodeKey;
InternalNetworkNode intNode = null;
if (!parentUpdate) {
- intNode = networkNodeMap.get(tpKey.nodeId());
+ intNode = networkNodeMap.get(tpKey);
if (intNode == null) {
log.error(" node is not in dataStore for tp update {}", tpKey);
return;
@@ -1351,7 +1351,7 @@
@Override
public void removeTerminationPoint(TerminationPointKey tpKey) {
// Update InternalNetworkNode
- InternalNetworkNode intNode = networkNodeMap.get(tpKey.nodeId());
+ InternalNetworkNode intNode = networkNodeMap.get(tpKey);
if (intNode != null && CollectionUtils.isNotEmpty(intNode.tpIds())) {
intNode.setChildUpdate(true);
intNode.tpIds().remove(tpKey.tpId());
diff --git a/apps/tetopology/app/src/test/java/org/onosproject/tetopology/management/DefaultBuilder.java b/apps/tetopology/app/src/test/java/org/onosproject/tetopology/management/DefaultBuilder.java
index 47cdcd6..1c82fcc 100644
--- a/apps/tetopology/app/src/test/java/org/onosproject/tetopology/management/DefaultBuilder.java
+++ b/apps/tetopology/app/src/test/java/org/onosproject/tetopology/management/DefaultBuilder.java
@@ -143,7 +143,7 @@
for (long i = 0; i < numTtps; i++) {
ttps.put(i, ttpBuilder(i));
}
- ttp = ttps.get(FIRST_INDEX);
+ ttp = ttps.get((long) FIRST_INDEX);
//TeNode
teNode = new DefaultTeNode(teNodeId, underlayTopologyId,
supportTeNodeId, sourceTeNodeId,
diff --git a/apps/tetopology/app/src/test/java/org/onosproject/tetopology/management/SimpleTeTopologyStore.java b/apps/tetopology/app/src/test/java/org/onosproject/tetopology/management/SimpleTeTopologyStore.java
index bc1c818..7f010fa 100644
--- a/apps/tetopology/app/src/test/java/org/onosproject/tetopology/management/SimpleTeTopologyStore.java
+++ b/apps/tetopology/app/src/test/java/org/onosproject/tetopology/management/SimpleTeTopologyStore.java
@@ -697,7 +697,7 @@
if (intNework != null
&& CollectionUtils.isNotEmpty(intNework.nodeIds())) {
intNework.setChildUpdate(true);
- intNework.nodeIds().remove(nodeKey.nodeId());
+ intNework.nodeIds().remove(nodeKey);
}
InternalNetworkNode intNode = networkNodeMap.remove(nodeKey);
if (intNode != null && CollectionUtils.isNotEmpty(intNode.tpIds())) {
@@ -905,7 +905,7 @@
if (intNework != null
&& CollectionUtils.isNotEmpty(intNework.linkIds())) {
intNework.setChildUpdate(true);
- intNework.linkIds().remove(linkKey.linkId());
+ intNework.linkIds().remove(linkKey);
}
// Remove it from networkLinkMap
InternalNetworkLink intLink = networkLinkMap.remove(linkKey);
@@ -937,7 +937,7 @@
TeNodeKey myTeNodeKey;
InternalNetworkNode intNode = null;
if (!parentUpdate) {
- intNode = networkNodeMap.get(tpKey.nodeId());
+ intNode = networkNodeMap.get(tpKey);
if (intNode == null) {
log.error(" node is not in dataStore for tp update {}", tpKey);
return;
@@ -974,7 +974,7 @@
@Override
public void removeTerminationPoint(TerminationPointKey tpKey) {
// Update InternalNetworkNode
- InternalNetworkNode intNode = networkNodeMap.get(tpKey.nodeId());
+ InternalNetworkNode intNode = networkNodeMap.get(tpKey);
if (intNode != null && CollectionUtils.isNotEmpty(intNode.tpIds())) {
intNode.setChildUpdate(true);
intNode.tpIds().remove(tpKey.tpId());
diff --git a/apps/vpls/src/test/java/org/onosproject/vpls/VplsTest.java b/apps/vpls/src/test/java/org/onosproject/vpls/VplsTest.java
index 2e42254..10bd51c 100644
--- a/apps/vpls/src/test/java/org/onosproject/vpls/VplsTest.java
+++ b/apps/vpls/src/test/java/org/onosproject/vpls/VplsTest.java
@@ -52,6 +52,7 @@
import org.onosproject.net.host.HostEvent;
import org.onosproject.net.host.HostListener;
import org.onosproject.net.host.HostServiceAdapter;
+import org.onosproject.net.host.InterfaceIpAddress;
import org.onosproject.net.intent.Intent;
import org.onosproject.net.intent.IntentData;
import org.onosproject.net.intent.IntentEvent;
@@ -396,7 +397,11 @@
@Override
public Set<Interface> getInterfacesByIp(IpAddress ip) {
return AVAILABLE_INTERFACES.stream()
- .filter(intf -> intf.ipAddressesList().contains(ip))
+ .filter(intf -> intf.ipAddressesList().stream()
+ .map(InterfaceIpAddress::ipAddress)
+ .filter(ip::equals)
+ .findAny()
+ .isPresent())
.collect(Collectors.toSet());
}
@@ -410,7 +415,11 @@
@Override
public Interface getMatchingInterface(IpAddress ip) {
return AVAILABLE_INTERFACES.stream()
- .filter(intf -> intf.ipAddressesList().contains(ip))
+ .filter(intf -> intf.ipAddressesList().stream()
+ .map(InterfaceIpAddress::ipAddress)
+ .filter(ip::equals)
+ .findAny()
+ .isPresent())
.findFirst()
.orElse(null);
}
@@ -418,7 +427,11 @@
@Override
public Set<Interface> getMatchingInterfaces(IpAddress ip) {
return AVAILABLE_INTERFACES.stream()
- .filter(intf -> intf.ipAddressesList().contains(ip))
+ .filter(intf -> intf.ipAddressesList().stream()
+ .map(InterfaceIpAddress::ipAddress)
+ .filter(ip::equals)
+ .findAny()
+ .isPresent())
.collect(Collectors.toSet());
}
}
diff --git a/apps/vtn/vtnrsc/src/test/java/org/onosproject/vtnrsc/util/VtnEventuallyConsistentMapTest.java b/apps/vtn/vtnrsc/src/test/java/org/onosproject/vtnrsc/util/VtnEventuallyConsistentMapTest.java
index b95b0be..38ceb0b 100644
--- a/apps/vtn/vtnrsc/src/test/java/org/onosproject/vtnrsc/util/VtnEventuallyConsistentMapTest.java
+++ b/apps/vtn/vtnrsc/src/test/java/org/onosproject/vtnrsc/util/VtnEventuallyConsistentMapTest.java
@@ -89,6 +89,7 @@
return map.get(key);
}
+ @SuppressWarnings("ReturnValueIgnored")
@Override
public void put(K key, V value) {
map.put(key, value);
diff --git a/apps/yms/app/pom.xml b/apps/yms/app/pom.xml
index 08a3713..e65758d 100644
--- a/apps/yms/app/pom.xml
+++ b/apps/yms/app/pom.xml
@@ -66,7 +66,6 @@
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
- <version>3.2.0</version>
<extensions>true</extensions>
<configuration>
<instructions>
@@ -79,6 +78,32 @@
</instructions>
</configuration>
</plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <compilerArgs>
+ <arg>-XepDisableAllChecks</arg>
+ <arg>-Xep:BetaApi:OFF</arg>
+ </compilerArgs>
+ </configuration>
+ <executions>
+ <execution>
+ <phase>compile</phase>
+ <goals>
+ <goal>compile</goal>
+ </goals>
+ <configuration>
+ <compilerArgs>
+ <arg>-XepDisableAllChecks</arg>
+ <arg>-Xep:BetaApi:OFF</arg>
+ </compilerArgs>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+
</plugins>
</build>
</project>
diff --git a/apps/yms/ut/pom.xml b/apps/yms/ut/pom.xml
index a89438b..ca2f681 100644
--- a/apps/yms/ut/pom.xml
+++ b/apps/yms/ut/pom.xml
@@ -115,6 +115,31 @@
</executions>
</plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <compilerArgs>
+ <arg>-XepDisableAllChecks</arg>
+ <arg>-Xep:BetaApi:OFF</arg>
+ </compilerArgs>
+ </configuration>
+ <executions>
+ <execution>
+ <phase>compile</phase>
+ <goals>
+ <goal>compile</goal>
+ </goals>
+ <configuration>
+ <compilerArgs>
+ <arg>-XepDisableAllChecks</arg>
+ <arg>-Xep:BetaApi:OFF</arg>
+ </compilerArgs>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+
</plugins>
</build>
</project>