From: Tom Pantelis Date: Wed, 17 Jan 2018 20:40:50 +0000 (-0500) Subject: Fix FindBugs violations X-Git-Tag: release/fluorine~71^2 X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=commitdiff_plain;h=a0221a546391fd27156d5c37f90c8acfe2bc5fca;p=neutron.git Fix FindBugs violations - Confusing to have methods with similar names - Class implements same interface as superclass - Non-transient non-serializable instance field 'segments' in serializable class - Method invokes toString() method on a String - Boxed value is unboxed and then immediately reboxed - Method ignores exceptional return value Change-Id: If5bc9c997e879cffd44a4e3390e59a9cfabaf42e Signed-off-by: Tom Pantelis --- diff --git a/.gitignore b/.gitignore index a2903aeaf..6740902df 100644 --- a/.gitignore +++ b/.gitignore @@ -28,3 +28,5 @@ yang-gen-config yang-gen-sal maven-metadata-local.xml .factorypath +.fbExcludeFilterFile + diff --git a/neutron-hostconfig/vpp/src/main/java/org/opendaylight/neutron/hostconfig/vpp/NeutronHostconfigVppListener.java b/neutron-hostconfig/vpp/src/main/java/org/opendaylight/neutron/hostconfig/vpp/NeutronHostconfigVppListener.java index 7faa9aaa0..205ac3542 100644 --- a/neutron-hostconfig/vpp/src/main/java/org/opendaylight/neutron/hostconfig/vpp/NeutronHostconfigVppListener.java +++ b/neutron-hostconfig/vpp/src/main/java/org/opendaylight/neutron/hostconfig/vpp/NeutronHostconfigVppListener.java @@ -80,7 +80,7 @@ public class NeutronHostconfigVppListener implements ClusteredDataTreeChangeList @Override public void onDataTreeChanged(@Nonnull Collection> changes) { LOG.info("onDataTreeChanged: Received Data Tree Changed ...", changes); - executorService.submit(() -> { + executorService.execute(() -> { for (DataTreeModification change : Preconditions.checkNotNull(changes, "Changes may not be null!")) { processDataTreeModification(change); } diff --git a/neutron-spi/src/main/java/org/opendaylight/neutron/spi/NeutronAdminAttributes.java b/neutron-spi/src/main/java/org/opendaylight/neutron/spi/NeutronAdminAttributes.java index bd81eef88..0a93ffcf2 100644 --- a/neutron-spi/src/main/java/org/opendaylight/neutron/spi/NeutronAdminAttributes.java +++ b/neutron-spi/src/main/java/org/opendaylight/neutron/spi/NeutronAdminAttributes.java @@ -9,7 +9,6 @@ package org.opendaylight.neutron.spi; -import java.io.Serializable; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; @@ -17,8 +16,8 @@ import javax.xml.bind.annotation.XmlRootElement; @XmlRootElement @XmlAccessorType(XmlAccessType.NONE) -public abstract class NeutronAdminAttributes extends NeutronBaseAttributes - implements Serializable, INeutronAdminAttributes { +public abstract class NeutronAdminAttributes> extends NeutronBaseAttributes + implements INeutronAdminAttributes { private static final long serialVersionUID = 1L; @XmlElement(defaultValue = "true", name = "admin_state_up") @@ -30,18 +29,29 @@ public abstract class NeutronAdminAttributes e public NeutronAdminAttributes() { } + @Override public Boolean getAdminStateUp() { return adminStateUp; } + public boolean isAdminStateUp() { + if (adminStateUp == null) { + return true; + } + return adminStateUp; + } + + @Override public void setAdminStateUp(Boolean adminStateUp) { this.adminStateUp = adminStateUp; } + @Override public String getStatus() { return status; } + @Override public void setStatus(String status) { this.status = status; } diff --git a/neutron-spi/src/main/java/org/opendaylight/neutron/spi/NeutronBaseAttributes.java b/neutron-spi/src/main/java/org/opendaylight/neutron/spi/NeutronBaseAttributes.java index e6ca2c99d..f4d274d02 100644 --- a/neutron-spi/src/main/java/org/opendaylight/neutron/spi/NeutronBaseAttributes.java +++ b/neutron-spi/src/main/java/org/opendaylight/neutron/spi/NeutronBaseAttributes.java @@ -9,7 +9,6 @@ package org.opendaylight.neutron.spi; -import java.io.Serializable; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; @@ -17,8 +16,8 @@ import javax.xml.bind.annotation.XmlRootElement; @XmlRootElement @XmlAccessorType(XmlAccessType.NONE) -public abstract class NeutronBaseAttributes extends NeutronObject - implements Serializable, INeutronBaseAttributes { +public abstract class NeutronBaseAttributes> extends NeutronObject + implements INeutronBaseAttributes { private static final long serialVersionUID = 1L; @XmlElement(name = "name") diff --git a/neutron-spi/src/main/java/org/opendaylight/neutron/spi/NeutronBgpvpn.java b/neutron-spi/src/main/java/org/opendaylight/neutron/spi/NeutronBgpvpn.java index dd7a57a46..1684d5b06 100644 --- a/neutron-spi/src/main/java/org/opendaylight/neutron/spi/NeutronBgpvpn.java +++ b/neutron-spi/src/main/java/org/opendaylight/neutron/spi/NeutronBgpvpn.java @@ -8,7 +8,6 @@ package org.opendaylight.neutron.spi; -import java.io.Serializable; import java.util.List; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; @@ -17,7 +16,7 @@ import javax.xml.bind.annotation.XmlRootElement; @XmlRootElement(name = "bgpvpn") @XmlAccessorType(XmlAccessType.NONE) -public final class NeutronBgpvpn extends NeutronAdminAttributes implements Serializable { +public final class NeutronBgpvpn extends NeutronAdminAttributes { // See OpenStack Network API v2.0 Reference for description of // annotated attributes @@ -60,6 +59,7 @@ public final class NeutronBgpvpn extends NeutronAdminAttributes i public NeutronBgpvpn() { } + @Override public void initDefaults() { super.initDefaults(); if (type == null) { @@ -70,10 +70,6 @@ public final class NeutronBgpvpn extends NeutronAdminAttributes i } } - public boolean isAdminStateUp() { - return adminStateUp; - } - public boolean isAutoAggregate() { return autoAggregate; } diff --git a/neutron-spi/src/main/java/org/opendaylight/neutron/spi/NeutronFirewall.java b/neutron-spi/src/main/java/org/opendaylight/neutron/spi/NeutronFirewall.java index ca384d596..659293d5d 100644 --- a/neutron-spi/src/main/java/org/opendaylight/neutron/spi/NeutronFirewall.java +++ b/neutron-spi/src/main/java/org/opendaylight/neutron/spi/NeutronFirewall.java @@ -8,7 +8,6 @@ package org.opendaylight.neutron.spi; -import java.io.Serializable; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; @@ -33,7 +32,7 @@ import javax.xml.bind.annotation.XmlRootElement; @XmlRootElement @XmlAccessorType(XmlAccessType.NONE) -public final class NeutronFirewall extends NeutronBaseAttributes implements Serializable { +public final class NeutronFirewall extends NeutronBaseAttributes { private static final long serialVersionUID = 1L; @XmlElement(defaultValue = "true", name = "admin_state_up") diff --git a/neutron-spi/src/main/java/org/opendaylight/neutron/spi/NeutronFirewallPolicy.java b/neutron-spi/src/main/java/org/opendaylight/neutron/spi/NeutronFirewallPolicy.java index 5e9cfb969..ff44a5a83 100644 --- a/neutron-spi/src/main/java/org/opendaylight/neutron/spi/NeutronFirewallPolicy.java +++ b/neutron-spi/src/main/java/org/opendaylight/neutron/spi/NeutronFirewallPolicy.java @@ -8,7 +8,6 @@ package org.opendaylight.neutron.spi; -import java.io.Serializable; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; @@ -32,7 +31,7 @@ import javax.xml.bind.annotation.XmlRootElement; @XmlRootElement @XmlAccessorType(XmlAccessType.NONE) -public final class NeutronFirewallPolicy extends NeutronBaseAttributes implements Serializable { +public final class NeutronFirewallPolicy extends NeutronBaseAttributes { private static final long serialVersionUID = 1L; @XmlElement(defaultValue = "false", name = "shared") diff --git a/neutron-spi/src/main/java/org/opendaylight/neutron/spi/NeutronFirewallRule.java b/neutron-spi/src/main/java/org/opendaylight/neutron/spi/NeutronFirewallRule.java index 3fe580b3a..6bcd09faa 100644 --- a/neutron-spi/src/main/java/org/opendaylight/neutron/spi/NeutronFirewallRule.java +++ b/neutron-spi/src/main/java/org/opendaylight/neutron/spi/NeutronFirewallRule.java @@ -8,7 +8,6 @@ package org.opendaylight.neutron.spi; -import java.io.Serializable; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; @@ -44,7 +43,7 @@ import javax.xml.bind.annotation.XmlRootElement; @XmlRootElement @XmlAccessorType(XmlAccessType.NONE) -public final class NeutronFirewallRule extends NeutronBaseAttributes implements Serializable { +public final class NeutronFirewallRule extends NeutronBaseAttributes { private static final long serialVersionUID = 1L; @XmlElement(defaultValue = "false", name = "shared") diff --git a/neutron-spi/src/main/java/org/opendaylight/neutron/spi/NeutronFloatingIp.java b/neutron-spi/src/main/java/org/opendaylight/neutron/spi/NeutronFloatingIp.java index cff693525..73bf637a9 100644 --- a/neutron-spi/src/main/java/org/opendaylight/neutron/spi/NeutronFloatingIp.java +++ b/neutron-spi/src/main/java/org/opendaylight/neutron/spi/NeutronFloatingIp.java @@ -8,7 +8,6 @@ package org.opendaylight.neutron.spi; -import java.io.Serializable; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; @@ -16,8 +15,7 @@ import javax.xml.bind.annotation.XmlRootElement; @XmlRootElement @XmlAccessorType(XmlAccessType.NONE) -public final class NeutronFloatingIp - extends NeutronObject implements Serializable, INeutronObject { +public final class NeutronFloatingIp extends NeutronObject { private static final long serialVersionUID = 1L; // See OpenStack Network API v2.0 Reference for description of diff --git a/neutron-spi/src/main/java/org/opendaylight/neutron/spi/NeutronL2gateway.java b/neutron-spi/src/main/java/org/opendaylight/neutron/spi/NeutronL2gateway.java index 22321bb4b..28c68d3e0 100644 --- a/neutron-spi/src/main/java/org/opendaylight/neutron/spi/NeutronL2gateway.java +++ b/neutron-spi/src/main/java/org/opendaylight/neutron/spi/NeutronL2gateway.java @@ -8,15 +8,13 @@ package org.opendaylight.neutron.spi; -import java.io.Serializable; import java.util.ArrayList; import java.util.List; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; @XmlRootElement(name = "l2gateway") -public final class NeutronL2gateway extends NeutronBaseAttributes - implements Serializable { +public final class NeutronL2gateway extends NeutronBaseAttributes { private static final long serialVersionUID = 1L; @XmlElement(name = "devices") diff --git a/neutron-spi/src/main/java/org/opendaylight/neutron/spi/NeutronL2gatewayConnection.java b/neutron-spi/src/main/java/org/opendaylight/neutron/spi/NeutronL2gatewayConnection.java index d8b2b87af..e7befef39 100644 --- a/neutron-spi/src/main/java/org/opendaylight/neutron/spi/NeutronL2gatewayConnection.java +++ b/neutron-spi/src/main/java/org/opendaylight/neutron/spi/NeutronL2gatewayConnection.java @@ -8,7 +8,7 @@ package org.opendaylight.neutron.spi; -import java.io.Serializable; +import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; @@ -16,8 +16,7 @@ import javax.xml.bind.annotation.XmlRootElement; @XmlRootElement(name = "l2gatewayConnection") @XmlAccessorType(XmlAccessType.NONE) -public final class NeutronL2gatewayConnection extends NeutronBaseAttributes - implements Serializable { +public final class NeutronL2gatewayConnection extends NeutronBaseAttributes { private static final long serialVersionUID = 1L; @XmlElement(name = "gateway_id") @@ -56,10 +55,14 @@ public final class NeutronL2gatewayConnection extends NeutronBaseAttributes implements Serializable { +public final class NeutronLoadBalancer extends NeutronAdminAttributes { private static final long serialVersionUID = 1L; @XmlElement(name = "vip_address") diff --git a/neutron-spi/src/main/java/org/opendaylight/neutron/spi/NeutronLoadBalancerHealthMonitor.java b/neutron-spi/src/main/java/org/opendaylight/neutron/spi/NeutronLoadBalancerHealthMonitor.java index 768dbf171..325f0c6b8 100644 --- a/neutron-spi/src/main/java/org/opendaylight/neutron/spi/NeutronLoadBalancerHealthMonitor.java +++ b/neutron-spi/src/main/java/org/opendaylight/neutron/spi/NeutronLoadBalancerHealthMonitor.java @@ -8,7 +8,6 @@ package org.opendaylight.neutron.spi; -import java.io.Serializable; import java.util.List; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; @@ -38,8 +37,7 @@ import javax.xml.bind.annotation.XmlRootElement; @XmlRootElement @XmlAccessorType(XmlAccessType.NONE) -public final class NeutronLoadBalancerHealthMonitor extends NeutronObject - implements Serializable, INeutronObject { +public final class NeutronLoadBalancerHealthMonitor extends NeutronObject { private static final long serialVersionUID = 1L; @XmlElement(name = "type") diff --git a/neutron-spi/src/main/java/org/opendaylight/neutron/spi/NeutronLoadBalancerListener.java b/neutron-spi/src/main/java/org/opendaylight/neutron/spi/NeutronLoadBalancerListener.java index ac9cb5a77..bd1bf5d47 100644 --- a/neutron-spi/src/main/java/org/opendaylight/neutron/spi/NeutronLoadBalancerListener.java +++ b/neutron-spi/src/main/java/org/opendaylight/neutron/spi/NeutronLoadBalancerListener.java @@ -8,7 +8,6 @@ package org.opendaylight.neutron.spi; -import java.io.Serializable; import java.util.List; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; @@ -39,8 +38,7 @@ import javax.xml.bind.annotation.XmlRootElement; @XmlRootElement @XmlAccessorType(XmlAccessType.NONE) -public final class NeutronLoadBalancerListener extends NeutronBaseAttributes - implements Serializable { +public final class NeutronLoadBalancerListener extends NeutronBaseAttributes { private static final long serialVersionUID = 1L; @XmlElement(name = "default_pool_id") diff --git a/neutron-spi/src/main/java/org/opendaylight/neutron/spi/NeutronLoadBalancerPool.java b/neutron-spi/src/main/java/org/opendaylight/neutron/spi/NeutronLoadBalancerPool.java index 8d9ccca78..bcfdeda29 100644 --- a/neutron-spi/src/main/java/org/opendaylight/neutron/spi/NeutronLoadBalancerPool.java +++ b/neutron-spi/src/main/java/org/opendaylight/neutron/spi/NeutronLoadBalancerPool.java @@ -8,7 +8,6 @@ package org.opendaylight.neutron.spi; -import java.io.Serializable; import java.util.ArrayList; import java.util.List; import javax.xml.bind.annotation.XmlAccessType; @@ -37,8 +36,7 @@ import javax.xml.bind.annotation.XmlRootElement; @XmlRootElement @XmlAccessorType(XmlAccessType.NONE) -public final class NeutronLoadBalancerPool extends NeutronBaseAttributes - implements Serializable { +public final class NeutronLoadBalancerPool extends NeutronBaseAttributes { private static final long serialVersionUID = 1L; @XmlElement(name = "protocol") diff --git a/neutron-spi/src/main/java/org/opendaylight/neutron/spi/NeutronLoadBalancerPoolMember.java b/neutron-spi/src/main/java/org/opendaylight/neutron/spi/NeutronLoadBalancerPoolMember.java index f0687bb05..38915c0c6 100644 --- a/neutron-spi/src/main/java/org/opendaylight/neutron/spi/NeutronLoadBalancerPoolMember.java +++ b/neutron-spi/src/main/java/org/opendaylight/neutron/spi/NeutronLoadBalancerPoolMember.java @@ -8,7 +8,6 @@ package org.opendaylight.neutron.spi; -import java.io.Serializable; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; @@ -17,8 +16,7 @@ import javax.xml.bind.annotation.XmlTransient; @XmlRootElement @XmlAccessorType(XmlAccessType.NONE) -public final class NeutronLoadBalancerPoolMember extends NeutronObject - implements Serializable, INeutronObject { +public final class NeutronLoadBalancerPoolMember extends NeutronObject { private static final long serialVersionUID = 1L; /** diff --git a/neutron-spi/src/main/java/org/opendaylight/neutron/spi/NeutronMeteringLabel.java b/neutron-spi/src/main/java/org/opendaylight/neutron/spi/NeutronMeteringLabel.java index 5b434bb5e..36c7ce481 100644 --- a/neutron-spi/src/main/java/org/opendaylight/neutron/spi/NeutronMeteringLabel.java +++ b/neutron-spi/src/main/java/org/opendaylight/neutron/spi/NeutronMeteringLabel.java @@ -8,7 +8,6 @@ package org.opendaylight.neutron.spi; -import java.io.Serializable; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; @@ -16,7 +15,7 @@ import javax.xml.bind.annotation.XmlRootElement; @XmlRootElement @XmlAccessorType(XmlAccessType.NONE) -public final class NeutronMeteringLabel extends NeutronBaseAttributes implements Serializable { +public final class NeutronMeteringLabel extends NeutronBaseAttributes { private static final long serialVersionUID = 1L; @XmlElement(defaultValue = "false", name = "shared") diff --git a/neutron-spi/src/main/java/org/opendaylight/neutron/spi/NeutronMeteringLabelRule.java b/neutron-spi/src/main/java/org/opendaylight/neutron/spi/NeutronMeteringLabelRule.java index 6ee9f552b..2acbf768c 100644 --- a/neutron-spi/src/main/java/org/opendaylight/neutron/spi/NeutronMeteringLabelRule.java +++ b/neutron-spi/src/main/java/org/opendaylight/neutron/spi/NeutronMeteringLabelRule.java @@ -8,7 +8,6 @@ package org.opendaylight.neutron.spi; -import java.io.Serializable; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; @@ -16,8 +15,7 @@ import javax.xml.bind.annotation.XmlRootElement; @XmlRootElement @XmlAccessorType(XmlAccessType.NONE) -public final class NeutronMeteringLabelRule extends NeutronObject - implements Serializable, INeutronObject { +public final class NeutronMeteringLabelRule extends NeutronObject { private static final long serialVersionUID = 1L; @XmlElement(name = "direction") diff --git a/neutron-spi/src/main/java/org/opendaylight/neutron/spi/NeutronNetwork.java b/neutron-spi/src/main/java/org/opendaylight/neutron/spi/NeutronNetwork.java index 5c48228ee..174575163 100644 --- a/neutron-spi/src/main/java/org/opendaylight/neutron/spi/NeutronNetwork.java +++ b/neutron-spi/src/main/java/org/opendaylight/neutron/spi/NeutronNetwork.java @@ -8,7 +8,7 @@ package org.opendaylight.neutron.spi; -import java.io.Serializable; +import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import java.util.List; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; @@ -17,7 +17,10 @@ import javax.xml.bind.annotation.XmlRootElement; @XmlRootElement(name = "network") @XmlAccessorType(XmlAccessType.NONE) -public final class NeutronNetwork extends NeutronAdminAttributes implements Serializable { +// Non-transient non-serializable instance field 'segments' - we have to assume/hope users will set a Serializable List +// instance. +@SuppressFBWarnings("SE_BAD_FIELD") +public final class NeutronNetwork extends NeutronAdminAttributes { // See OpenStack Network API v2.0 Reference for description of // annotated attributes @@ -75,11 +78,11 @@ public final class NeutronNetwork extends NeutronAdminAttributes } } - public boolean isAdminStateUp() { - return adminStateUp; - } - public boolean isShared() { + if (shared == null) { + return false; + } + return shared; } @@ -92,6 +95,10 @@ public final class NeutronNetwork extends NeutronAdminAttributes } public boolean isRouterExternal() { + if (routerExternal == null) { + return false; + } + return routerExternal; } @@ -163,7 +170,7 @@ public final class NeutronNetwork extends NeutronAdminAttributes public boolean extractField(String field, NeutronNetwork ans) { switch (field) { case "shared": - ans.setShared(shared); + ans.setShared(isShared()); break; case "external": ans.setRouterExternal(this.getRouterExternal()); diff --git a/neutron-spi/src/main/java/org/opendaylight/neutron/spi/NeutronObject.java b/neutron-spi/src/main/java/org/opendaylight/neutron/spi/NeutronObject.java index cfd4302f5..d138cc4a3 100644 --- a/neutron-spi/src/main/java/org/opendaylight/neutron/spi/NeutronObject.java +++ b/neutron-spi/src/main/java/org/opendaylight/neutron/spi/NeutronObject.java @@ -9,7 +9,6 @@ package org.opendaylight.neutron.spi; -import java.io.Serializable; import java.lang.reflect.ParameterizedType; import java.lang.reflect.Type; import java.util.List; @@ -24,8 +23,7 @@ import org.slf4j.LoggerFactory; @XmlRootElement @XmlAccessorType(XmlAccessType.NONE) -public abstract class NeutronObject extends NeutronID - implements Serializable, INeutronObject { +public abstract class NeutronObject> extends NeutronID implements INeutronObject { // T extends NeutronObject as 0th type argument. Used by extractFields() private static final int NEUTRON_OBJECT_CLASS_TYPE_INDEX = 0; diff --git a/neutron-spi/src/main/java/org/opendaylight/neutron/spi/NeutronPort.java b/neutron-spi/src/main/java/org/opendaylight/neutron/spi/NeutronPort.java index f990d3714..4de5dffd0 100644 --- a/neutron-spi/src/main/java/org/opendaylight/neutron/spi/NeutronPort.java +++ b/neutron-spi/src/main/java/org/opendaylight/neutron/spi/NeutronPort.java @@ -8,7 +8,6 @@ package org.opendaylight.neutron.spi; -import java.io.Serializable; import java.util.ArrayList; import java.util.HashMap; import java.util.List; @@ -21,7 +20,7 @@ import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; @XmlRootElement @XmlAccessorType(XmlAccessType.NONE) -public final class NeutronPort extends NeutronAdminAttributes implements Serializable { +public final class NeutronPort extends NeutronAdminAttributes { private static final long serialVersionUID = 1L; // See OpenStack Network API v2.0 Reference for description of @@ -90,13 +89,6 @@ public final class NeutronPort extends NeutronAdminAttributes imple this.networkUUID = networkUUID; } - public boolean isAdminStateUp() { - if (adminStateUp == null) { - return true; - } - return adminStateUp; - } - public String getMacAddress() { return macAddress; } diff --git a/neutron-spi/src/main/java/org/opendaylight/neutron/spi/NeutronQosBandwidthLimitRule.java b/neutron-spi/src/main/java/org/opendaylight/neutron/spi/NeutronQosBandwidthLimitRule.java index bbc64df57..52c4a1e9f 100644 --- a/neutron-spi/src/main/java/org/opendaylight/neutron/spi/NeutronQosBandwidthLimitRule.java +++ b/neutron-spi/src/main/java/org/opendaylight/neutron/spi/NeutronQosBandwidthLimitRule.java @@ -8,7 +8,6 @@ package org.opendaylight.neutron.spi; -import java.io.Serializable; import java.math.BigInteger; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; @@ -17,8 +16,7 @@ import javax.xml.bind.annotation.XmlRootElement; @XmlRootElement @XmlAccessorType(XmlAccessType.NONE) -public final class NeutronQosBandwidthLimitRule extends NeutronObject - implements Serializable, INeutronObject { +public final class NeutronQosBandwidthLimitRule extends NeutronObject { private static final long serialVersionUID = 1L; @XmlElement(name = "max_kbps") diff --git a/neutron-spi/src/main/java/org/opendaylight/neutron/spi/NeutronQosDscpMarkingRule.java b/neutron-spi/src/main/java/org/opendaylight/neutron/spi/NeutronQosDscpMarkingRule.java index abc68ec8b..6e69e579a 100644 --- a/neutron-spi/src/main/java/org/opendaylight/neutron/spi/NeutronQosDscpMarkingRule.java +++ b/neutron-spi/src/main/java/org/opendaylight/neutron/spi/NeutronQosDscpMarkingRule.java @@ -8,7 +8,6 @@ package org.opendaylight.neutron.spi; -import java.io.Serializable; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; @@ -16,8 +15,7 @@ import javax.xml.bind.annotation.XmlRootElement; @XmlRootElement @XmlAccessorType(XmlAccessType.NONE) -public final class NeutronQosDscpMarkingRule extends NeutronObject - implements Serializable, INeutronObject { +public final class NeutronQosDscpMarkingRule extends NeutronObject { private static final long serialVersionUID = 1L; @XmlElement(name = "dscp_mark") diff --git a/neutron-spi/src/main/java/org/opendaylight/neutron/spi/NeutronQosMinimumBandwidthRule.java b/neutron-spi/src/main/java/org/opendaylight/neutron/spi/NeutronQosMinimumBandwidthRule.java index 3f7df0989..6c056c0df 100644 --- a/neutron-spi/src/main/java/org/opendaylight/neutron/spi/NeutronQosMinimumBandwidthRule.java +++ b/neutron-spi/src/main/java/org/opendaylight/neutron/spi/NeutronQosMinimumBandwidthRule.java @@ -7,7 +7,6 @@ */ package org.opendaylight.neutron.spi; -import java.io.Serializable; import java.math.BigInteger; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; @@ -17,8 +16,7 @@ import javax.xml.bind.annotation.XmlRootElement; @XmlRootElement @XmlAccessorType(XmlAccessType.NONE) -public final class NeutronQosMinimumBandwidthRule extends NeutronObject - implements Serializable, INeutronObject { +public final class NeutronQosMinimumBandwidthRule extends NeutronObject { private static final long serialVersionUID = 1L; @XmlElement(name = "min_kbps") @@ -66,4 +64,4 @@ public final class NeutronQosMinimumBandwidthRule extends NeutronObject implements Serializable { +public final class NeutronQosPolicy extends NeutronBaseAttributes { private static final long serialVersionUID = 1L; @XmlElement(defaultValue = "false", name = "shared") diff --git a/neutron-spi/src/main/java/org/opendaylight/neutron/spi/NeutronRouter.java b/neutron-spi/src/main/java/org/opendaylight/neutron/spi/NeutronRouter.java index e9a1e328f..cf49da79e 100644 --- a/neutron-spi/src/main/java/org/opendaylight/neutron/spi/NeutronRouter.java +++ b/neutron-spi/src/main/java/org/opendaylight/neutron/spi/NeutronRouter.java @@ -8,7 +8,6 @@ package org.opendaylight.neutron.spi; -import java.io.Serializable; import java.util.List; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; @@ -17,8 +16,7 @@ import javax.xml.bind.annotation.XmlRootElement; @XmlRootElement @XmlAccessorType(XmlAccessType.NONE) -public final class NeutronRouter extends NeutronAdminAttributes - implements Serializable { +public final class NeutronRouter extends NeutronAdminAttributes { private static final long serialVersionUID = 1L; // See OpenStack Network API v2.0 Reference for description of @@ -38,13 +36,6 @@ public final class NeutronRouter extends NeutronAdminAttributes public NeutronRouter() { } - public boolean isAdminStateUp() { - if (adminStateUp == null) { - return true; - } - return adminStateUp; - } - public NeutronRouterNetworkReference getExternalGatewayInfo() { return externalGatewayInfo; } diff --git a/neutron-spi/src/main/java/org/opendaylight/neutron/spi/NeutronRouterInterface.java b/neutron-spi/src/main/java/org/opendaylight/neutron/spi/NeutronRouterInterface.java index 99e2b953f..2961bc996 100644 --- a/neutron-spi/src/main/java/org/opendaylight/neutron/spi/NeutronRouterInterface.java +++ b/neutron-spi/src/main/java/org/opendaylight/neutron/spi/NeutronRouterInterface.java @@ -8,7 +8,6 @@ package org.opendaylight.neutron.spi; -import java.io.Serializable; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; @@ -16,8 +15,7 @@ import javax.xml.bind.annotation.XmlRootElement; @XmlRootElement @XmlAccessorType(XmlAccessType.NONE) -public final class NeutronRouterInterface extends NeutronObject - implements Serializable, INeutronObject { +public final class NeutronRouterInterface extends NeutronObject { private static final long serialVersionUID = 1L; // See OpenStack Network API v2.0 Reference for description of diff --git a/neutron-spi/src/main/java/org/opendaylight/neutron/spi/NeutronSFCFlowClassifier.java b/neutron-spi/src/main/java/org/opendaylight/neutron/spi/NeutronSFCFlowClassifier.java index f9c629c64..9e01a1db8 100644 --- a/neutron-spi/src/main/java/org/opendaylight/neutron/spi/NeutronSFCFlowClassifier.java +++ b/neutron-spi/src/main/java/org/opendaylight/neutron/spi/NeutronSFCFlowClassifier.java @@ -7,7 +7,6 @@ */ package org.opendaylight.neutron.spi; -import java.io.Serializable; import java.util.HashMap; import java.util.Map; import javax.xml.bind.annotation.XmlAccessType; @@ -18,8 +17,7 @@ import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; @XmlRootElement @XmlAccessorType(XmlAccessType.NONE) -public final class NeutronSFCFlowClassifier extends NeutronBaseAttributes - implements Serializable { +public final class NeutronSFCFlowClassifier extends NeutronBaseAttributes { private static final long serialVersionUID = 1L; // See OpenStack Networking SFC (networking-sfc) API v1.0 Reference for description of diff --git a/neutron-spi/src/main/java/org/opendaylight/neutron/spi/NeutronSFCPortChain.java b/neutron-spi/src/main/java/org/opendaylight/neutron/spi/NeutronSFCPortChain.java index 4db17cdf0..9caa8e16c 100644 --- a/neutron-spi/src/main/java/org/opendaylight/neutron/spi/NeutronSFCPortChain.java +++ b/neutron-spi/src/main/java/org/opendaylight/neutron/spi/NeutronSFCPortChain.java @@ -7,7 +7,6 @@ */ package org.opendaylight.neutron.spi; -import java.io.Serializable; import java.util.List; import java.util.Map; import javax.xml.bind.annotation.XmlAccessType; @@ -18,7 +17,7 @@ import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; @XmlRootElement @XmlAccessorType(XmlAccessType.NONE) -public final class NeutronSFCPortChain extends NeutronBaseAttributes implements Serializable { +public final class NeutronSFCPortChain extends NeutronBaseAttributes { private static final long serialVersionUID = 1L; // See OpenStack Networking SFC (networking-sfc) Port Chain API v1.0 Reference diff --git a/neutron-spi/src/main/java/org/opendaylight/neutron/spi/NeutronSFCPortPair.java b/neutron-spi/src/main/java/org/opendaylight/neutron/spi/NeutronSFCPortPair.java index da291dcba..faeb9c5c8 100644 --- a/neutron-spi/src/main/java/org/opendaylight/neutron/spi/NeutronSFCPortPair.java +++ b/neutron-spi/src/main/java/org/opendaylight/neutron/spi/NeutronSFCPortPair.java @@ -7,7 +7,6 @@ */ package org.opendaylight.neutron.spi; -import java.io.Serializable; import java.util.HashMap; import java.util.Map; import javax.xml.bind.annotation.XmlAccessType; @@ -18,7 +17,7 @@ import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; @XmlRootElement @XmlAccessorType(XmlAccessType.NONE) -public final class NeutronSFCPortPair extends NeutronBaseAttributes implements Serializable { +public final class NeutronSFCPortPair extends NeutronBaseAttributes { private static final long serialVersionUID = 1L; // See OpenStack Networking SFC (networking-sfc) Port Pair API v1.0 Reference diff --git a/neutron-spi/src/main/java/org/opendaylight/neutron/spi/NeutronSFCPortPairGroup.java b/neutron-spi/src/main/java/org/opendaylight/neutron/spi/NeutronSFCPortPairGroup.java index ecf4c5459..319b82f25 100644 --- a/neutron-spi/src/main/java/org/opendaylight/neutron/spi/NeutronSFCPortPairGroup.java +++ b/neutron-spi/src/main/java/org/opendaylight/neutron/spi/NeutronSFCPortPairGroup.java @@ -7,7 +7,6 @@ */ package org.opendaylight.neutron.spi; -import java.io.Serializable; import java.util.List; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; @@ -16,8 +15,7 @@ import javax.xml.bind.annotation.XmlRootElement; @XmlRootElement @XmlAccessorType(XmlAccessType.NONE) -public final class NeutronSFCPortPairGroup extends NeutronBaseAttributes - implements Serializable { +public final class NeutronSFCPortPairGroup extends NeutronBaseAttributes { private static final long serialVersionUID = 1L; // See OpenStack Networking SFC (networking-sfc) Port Pair Group API v1.0 diff --git a/neutron-spi/src/main/java/org/opendaylight/neutron/spi/NeutronSecurityGroup.java b/neutron-spi/src/main/java/org/opendaylight/neutron/spi/NeutronSecurityGroup.java index c876ae393..591e89274 100644 --- a/neutron-spi/src/main/java/org/opendaylight/neutron/spi/NeutronSecurityGroup.java +++ b/neutron-spi/src/main/java/org/opendaylight/neutron/spi/NeutronSecurityGroup.java @@ -8,7 +8,6 @@ package org.opendaylight.neutron.spi; -import java.io.Serializable; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlRootElement; @@ -26,7 +25,7 @@ import javax.xml.bind.annotation.XmlRootElement; @XmlRootElement @XmlAccessorType(XmlAccessType.NONE) -public final class NeutronSecurityGroup extends NeutronBaseAttributes implements Serializable { +public final class NeutronSecurityGroup extends NeutronBaseAttributes { private static final long serialVersionUID = 1L; public NeutronSecurityGroup() { diff --git a/neutron-spi/src/main/java/org/opendaylight/neutron/spi/NeutronSecurityRule.java b/neutron-spi/src/main/java/org/opendaylight/neutron/spi/NeutronSecurityRule.java index bdfb20210..20de13342 100644 --- a/neutron-spi/src/main/java/org/opendaylight/neutron/spi/NeutronSecurityRule.java +++ b/neutron-spi/src/main/java/org/opendaylight/neutron/spi/NeutronSecurityRule.java @@ -8,7 +8,6 @@ package org.opendaylight.neutron.spi; -import java.io.Serializable; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; @@ -33,8 +32,7 @@ import javax.xml.bind.annotation.XmlRootElement; @XmlRootElement @XmlAccessorType(XmlAccessType.NONE) -public final class NeutronSecurityRule extends NeutronObject - implements Serializable, INeutronObject { +public final class NeutronSecurityRule extends NeutronObject { private static final long serialVersionUID = 1L; @XmlElement(name = "direction") diff --git a/neutron-spi/src/main/java/org/opendaylight/neutron/spi/NeutronSubnet.java b/neutron-spi/src/main/java/org/opendaylight/neutron/spi/NeutronSubnet.java index f3e848b6c..ba70c250b 100644 --- a/neutron-spi/src/main/java/org/opendaylight/neutron/spi/NeutronSubnet.java +++ b/neutron-spi/src/main/java/org/opendaylight/neutron/spi/NeutronSubnet.java @@ -9,7 +9,6 @@ package org.opendaylight.neutron.spi; import com.google.common.net.InetAddresses; -import java.io.Serializable; import java.math.BigInteger; import java.net.Inet6Address; import java.util.ArrayList; @@ -25,7 +24,7 @@ import org.slf4j.LoggerFactory; @XmlRootElement @XmlAccessorType(XmlAccessType.NONE) -public final class NeutronSubnet extends NeutronBaseAttributes implements Serializable { +public final class NeutronSubnet extends NeutronBaseAttributes { private static final Logger LOG = LoggerFactory.getLogger(NeutronCRUDInterfaces.class); private static final long serialVersionUID = 1L; @@ -234,12 +233,12 @@ public final class NeutronSubnet extends NeutronBaseAttributes im // convert to byte array byte[] addrBytes = ((Inet6Address) InetAddresses.forString(parts[0])).getAddress(); for (int index = length; index < IPV6_LENGTH; index++) { - if (((((int) addrBytes[index / IPV6_LENGTH_BYTES]) & IPV6_LSB_MASK) - & (1 << (IPV6_BYTE_OFFSET - (index % IPV6_LENGTH_BYTES)))) != 0) { - return (false); + if ((addrBytes[index / IPV6_LENGTH_BYTES] & IPV6_LSB_MASK + & 1 << IPV6_BYTE_OFFSET - index % IPV6_LENGTH_BYTES) != 0) { + return false; } } - return (true); + return true; } return false; } @@ -280,7 +279,7 @@ public final class NeutronSubnet extends NeutronBaseAttributes im try { SubnetUtils util = new SubnetUtils(cidr); SubnetInfo info = util.getInfo(); - if (gatewayIp == null || ("").equals(gatewayIp)) { + if (gatewayIp == null || "".equals(gatewayIp)) { gatewayIp = info.getLowAddress(); } if (allocationPools.size() < 1) { @@ -305,7 +304,7 @@ public final class NeutronSubnet extends NeutronBaseAttributes im BigInteger mask = BigInteger.ONE.shiftLeft(length).subtract(BigInteger.ONE); String highAddress = NeutronSubnetIpAllocationPool .bigIntegerToIp(lowAddressBi.add(mask).subtract(BigInteger.ONE)); - if (gatewayIp == null || ("").equals(gatewayIp)) { + if (gatewayIp == null || "".equals(gatewayIp)) { gatewayIp = lowAddress; } if (allocationPools.size() < 1) { @@ -338,14 +337,14 @@ public final class NeutronSubnet extends NeutronBaseAttributes im byte[] cidrBytes = ((Inet6Address) InetAddresses.forString(parts[0])).getAddress(); byte[] ipBytes = ((Inet6Address) InetAddresses.forString(ipAddress)).getAddress(); for (int index = 0; index < length; index++) { - if (((((int) cidrBytes[index / IPV6_LENGTH_BYTES]) & IPV6_LSB_MASK) & (1 << (IPV6_BYTE_OFFSET - - (index % IPV6_LENGTH_BYTES)))) != ( - (((int) ipBytes[index / IPV6_LENGTH_BYTES]) & IPV6_LSB_MASK) - & (1 << (IPV6_BYTE_OFFSET - (index % IPV6_LENGTH_BYTES))))) { - return (false); + if ((cidrBytes[index / IPV6_LENGTH_BYTES] & IPV6_LSB_MASK & 1 << IPV6_BYTE_OFFSET + - index % IPV6_LENGTH_BYTES) != ( + ipBytes[index / IPV6_LENGTH_BYTES] & IPV6_LSB_MASK + & 1 << IPV6_BYTE_OFFSET - index % IPV6_LENGTH_BYTES)) { + return false; } } - return (true); + return true; } return false; } diff --git a/neutron-spi/src/main/java/org/opendaylight/neutron/spi/NeutronTapFlow.java b/neutron-spi/src/main/java/org/opendaylight/neutron/spi/NeutronTapFlow.java index e58b8dfaf..8cf9796b3 100644 --- a/neutron-spi/src/main/java/org/opendaylight/neutron/spi/NeutronTapFlow.java +++ b/neutron-spi/src/main/java/org/opendaylight/neutron/spi/NeutronTapFlow.java @@ -8,7 +8,6 @@ package org.opendaylight.neutron.spi; -import java.io.Serializable; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; @@ -16,7 +15,7 @@ import javax.xml.bind.annotation.XmlRootElement; @XmlRootElement @XmlAccessorType(XmlAccessType.NONE) -public final class NeutronTapFlow extends NeutronBaseAttributes implements Serializable { +public final class NeutronTapFlow extends NeutronBaseAttributes { private static final long serialVersionUID = 1L; @XmlElement(name = "tap_service_id") diff --git a/neutron-spi/src/main/java/org/opendaylight/neutron/spi/NeutronTapService.java b/neutron-spi/src/main/java/org/opendaylight/neutron/spi/NeutronTapService.java index 5072ea3f0..f4b45e4d5 100644 --- a/neutron-spi/src/main/java/org/opendaylight/neutron/spi/NeutronTapService.java +++ b/neutron-spi/src/main/java/org/opendaylight/neutron/spi/NeutronTapService.java @@ -8,7 +8,6 @@ package org.opendaylight.neutron.spi; -import java.io.Serializable; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; @@ -16,7 +15,7 @@ import javax.xml.bind.annotation.XmlRootElement; @XmlRootElement @XmlAccessorType(XmlAccessType.NONE) -public final class NeutronTapService extends NeutronBaseAttributes implements Serializable { +public final class NeutronTapService extends NeutronBaseAttributes { private static final long serialVersionUID = 1L; @XmlElement(name = "port_id") diff --git a/neutron-spi/src/main/java/org/opendaylight/neutron/spi/NeutronTrunk.java b/neutron-spi/src/main/java/org/opendaylight/neutron/spi/NeutronTrunk.java index 5530223ba..832470485 100644 --- a/neutron-spi/src/main/java/org/opendaylight/neutron/spi/NeutronTrunk.java +++ b/neutron-spi/src/main/java/org/opendaylight/neutron/spi/NeutronTrunk.java @@ -8,7 +8,6 @@ package org.opendaylight.neutron.spi; -import java.io.Serializable; import java.util.ArrayList; import java.util.List; import javax.xml.bind.annotation.XmlAccessType; @@ -18,7 +17,7 @@ import javax.xml.bind.annotation.XmlRootElement; @XmlRootElement(name = "trunk") @XmlAccessorType(XmlAccessType.NONE) -public final class NeutronTrunk extends NeutronAdminAttributes implements Serializable { +public final class NeutronTrunk extends NeutronAdminAttributes { private static final long serialVersionUID = 1L; @XmlElement(name = "port_id") diff --git a/neutron-spi/src/main/java/org/opendaylight/neutron/spi/NeutronVpnIkePolicy.java b/neutron-spi/src/main/java/org/opendaylight/neutron/spi/NeutronVpnIkePolicy.java index 307aa2459..b6339825e 100644 --- a/neutron-spi/src/main/java/org/opendaylight/neutron/spi/NeutronVpnIkePolicy.java +++ b/neutron-spi/src/main/java/org/opendaylight/neutron/spi/NeutronVpnIkePolicy.java @@ -8,7 +8,6 @@ package org.opendaylight.neutron.spi; -import java.io.Serializable; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; @@ -16,7 +15,7 @@ import javax.xml.bind.annotation.XmlRootElement; @XmlRootElement @XmlAccessorType(XmlAccessType.NONE) -public final class NeutronVpnIkePolicy extends NeutronBaseAttributes implements Serializable { +public final class NeutronVpnIkePolicy extends NeutronBaseAttributes { private static final long serialVersionUID = 1L; // See OpenStack Network API v2.0 Reference for description of diff --git a/neutron-spi/src/main/java/org/opendaylight/neutron/spi/NeutronVpnIpSecPolicy.java b/neutron-spi/src/main/java/org/opendaylight/neutron/spi/NeutronVpnIpSecPolicy.java index aa097adc4..e8b697c26 100644 --- a/neutron-spi/src/main/java/org/opendaylight/neutron/spi/NeutronVpnIpSecPolicy.java +++ b/neutron-spi/src/main/java/org/opendaylight/neutron/spi/NeutronVpnIpSecPolicy.java @@ -8,7 +8,6 @@ package org.opendaylight.neutron.spi; -import java.io.Serializable; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; @@ -16,7 +15,7 @@ import javax.xml.bind.annotation.XmlRootElement; @XmlRootElement @XmlAccessorType(XmlAccessType.NONE) -public final class NeutronVpnIpSecPolicy extends NeutronBaseAttributes implements Serializable { +public final class NeutronVpnIpSecPolicy extends NeutronBaseAttributes { private static final long serialVersionUID = 1L; // See OpenStack Network API v2.0 Reference for description of diff --git a/neutron-spi/src/main/java/org/opendaylight/neutron/spi/NeutronVpnIpSecSiteConnection.java b/neutron-spi/src/main/java/org/opendaylight/neutron/spi/NeutronVpnIpSecSiteConnection.java index 2555e23d3..ff685769c 100644 --- a/neutron-spi/src/main/java/org/opendaylight/neutron/spi/NeutronVpnIpSecSiteConnection.java +++ b/neutron-spi/src/main/java/org/opendaylight/neutron/spi/NeutronVpnIpSecSiteConnection.java @@ -8,7 +8,6 @@ package org.opendaylight.neutron.spi; -import java.io.Serializable; import java.util.List; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; @@ -17,8 +16,7 @@ import javax.xml.bind.annotation.XmlRootElement; @XmlRootElement @XmlAccessorType(XmlAccessType.NONE) -public final class NeutronVpnIpSecSiteConnection extends NeutronAdminAttributes - implements Serializable { +public final class NeutronVpnIpSecSiteConnection extends NeutronAdminAttributes { private static final long serialVersionUID = 1L; // See OpenStack Network API v2.0 Reference for description of diff --git a/neutron-spi/src/main/java/org/opendaylight/neutron/spi/NeutronVpnService.java b/neutron-spi/src/main/java/org/opendaylight/neutron/spi/NeutronVpnService.java index 458300f80..e7264933d 100644 --- a/neutron-spi/src/main/java/org/opendaylight/neutron/spi/NeutronVpnService.java +++ b/neutron-spi/src/main/java/org/opendaylight/neutron/spi/NeutronVpnService.java @@ -8,7 +8,6 @@ package org.opendaylight.neutron.spi; -import java.io.Serializable; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; @@ -16,7 +15,7 @@ import javax.xml.bind.annotation.XmlRootElement; @XmlRootElement @XmlAccessorType(XmlAccessType.NONE) -public final class NeutronVpnService extends NeutronAdminAttributes implements Serializable { +public final class NeutronVpnService extends NeutronAdminAttributes { private static final long serialVersionUID = 1L; // See OpenStack Network API v2.0 Reference for description of diff --git a/northbound-api/src/main/java/org/opendaylight/neutron/northbound/api/NeutronBgpvpnRequest.java b/northbound-api/src/main/java/org/opendaylight/neutron/northbound/api/NeutronBgpvpnRequest.java index 320463f97..46601b106 100644 --- a/northbound-api/src/main/java/org/opendaylight/neutron/northbound/api/NeutronBgpvpnRequest.java +++ b/northbound-api/src/main/java/org/opendaylight/neutron/northbound/api/NeutronBgpvpnRequest.java @@ -8,6 +8,7 @@ package org.opendaylight.neutron.northbound.api; +import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import java.util.List; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; @@ -17,6 +18,7 @@ import org.opendaylight.neutron.spi.NeutronBgpvpn; @XmlRootElement @XmlAccessorType(XmlAccessType.NONE) +@SuppressFBWarnings("URF_UNREAD_FIELD") public final class NeutronBgpvpnRequest implements INeutronRequest { // See OpenStack Network API v2.0 Reference for description of // annotated attributes diff --git a/northbound-api/src/main/java/org/opendaylight/neutron/northbound/api/NeutronFirewallPolicyRequest.java b/northbound-api/src/main/java/org/opendaylight/neutron/northbound/api/NeutronFirewallPolicyRequest.java index 2ea5ce122..b971c7a4b 100644 --- a/northbound-api/src/main/java/org/opendaylight/neutron/northbound/api/NeutronFirewallPolicyRequest.java +++ b/northbound-api/src/main/java/org/opendaylight/neutron/northbound/api/NeutronFirewallPolicyRequest.java @@ -8,6 +8,7 @@ package org.opendaylight.neutron.northbound.api; +import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import java.util.List; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; @@ -17,6 +18,7 @@ import org.opendaylight.neutron.spi.NeutronFirewallPolicy; @XmlRootElement @XmlAccessorType(XmlAccessType.NONE) +@SuppressFBWarnings("URF_UNREAD_FIELD") public final class NeutronFirewallPolicyRequest implements INeutronRequest { /** * See OpenStack Network API v2.0 Reference for description of the following link. diff --git a/northbound-api/src/main/java/org/opendaylight/neutron/northbound/api/NeutronFirewallRequest.java b/northbound-api/src/main/java/org/opendaylight/neutron/northbound/api/NeutronFirewallRequest.java index 9f95fcc96..35bb0b528 100644 --- a/northbound-api/src/main/java/org/opendaylight/neutron/northbound/api/NeutronFirewallRequest.java +++ b/northbound-api/src/main/java/org/opendaylight/neutron/northbound/api/NeutronFirewallRequest.java @@ -8,6 +8,7 @@ package org.opendaylight.neutron.northbound.api; +import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import java.util.List; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; @@ -17,6 +18,7 @@ import org.opendaylight.neutron.spi.NeutronFirewall; @XmlRootElement @XmlAccessorType(XmlAccessType.NONE) +@SuppressFBWarnings("URF_UNREAD_FIELD") public final class NeutronFirewallRequest implements INeutronRequest { /** * See OpenStack Network API v2.0 Reference for description of the following link. diff --git a/northbound-api/src/main/java/org/opendaylight/neutron/northbound/api/NeutronFirewallRuleRequest.java b/northbound-api/src/main/java/org/opendaylight/neutron/northbound/api/NeutronFirewallRuleRequest.java index 0f3d7be02..c5bab0b37 100644 --- a/northbound-api/src/main/java/org/opendaylight/neutron/northbound/api/NeutronFirewallRuleRequest.java +++ b/northbound-api/src/main/java/org/opendaylight/neutron/northbound/api/NeutronFirewallRuleRequest.java @@ -8,6 +8,7 @@ package org.opendaylight.neutron.northbound.api; +import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import java.util.List; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; @@ -17,6 +18,7 @@ import org.opendaylight.neutron.spi.NeutronFirewallRule; @XmlRootElement @XmlAccessorType(XmlAccessType.NONE) +@SuppressFBWarnings("URF_UNREAD_FIELD") public final class NeutronFirewallRuleRequest implements INeutronRequest { /** * See OpenStack Network API v2.0 Reference for description of the following link. diff --git a/northbound-api/src/main/java/org/opendaylight/neutron/northbound/api/NeutronFloatingIpRequest.java b/northbound-api/src/main/java/org/opendaylight/neutron/northbound/api/NeutronFloatingIpRequest.java index ee0cf7bab..9487703d9 100644 --- a/northbound-api/src/main/java/org/opendaylight/neutron/northbound/api/NeutronFloatingIpRequest.java +++ b/northbound-api/src/main/java/org/opendaylight/neutron/northbound/api/NeutronFloatingIpRequest.java @@ -8,6 +8,7 @@ package org.opendaylight.neutron.northbound.api; +import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import java.util.List; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; @@ -17,6 +18,7 @@ import org.opendaylight.neutron.spi.NeutronFloatingIp; @XmlRootElement @XmlAccessorType(XmlAccessType.NONE) +@SuppressFBWarnings("URF_UNREAD_FIELD") public final class NeutronFloatingIpRequest implements INeutronRequest { // See OpenStack Network API v2.0 Reference for description of // annotated attributes diff --git a/northbound-api/src/main/java/org/opendaylight/neutron/northbound/api/NeutronL2gatewayConnectionRequest.java b/northbound-api/src/main/java/org/opendaylight/neutron/northbound/api/NeutronL2gatewayConnectionRequest.java index d3acbb6d4..74552472c 100644 --- a/northbound-api/src/main/java/org/opendaylight/neutron/northbound/api/NeutronL2gatewayConnectionRequest.java +++ b/northbound-api/src/main/java/org/opendaylight/neutron/northbound/api/NeutronL2gatewayConnectionRequest.java @@ -8,6 +8,7 @@ package org.opendaylight.neutron.northbound.api; +import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import java.util.List; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; @@ -17,6 +18,7 @@ import org.opendaylight.neutron.spi.NeutronL2gatewayConnection; @XmlRootElement @XmlAccessorType(XmlAccessType.NONE) +@SuppressFBWarnings("URF_UNREAD_FIELD") public final class NeutronL2gatewayConnectionRequest implements INeutronRequest { @XmlElement(name = "l2gateway_connection") NeutronL2gatewayConnection singleton; diff --git a/northbound-api/src/main/java/org/opendaylight/neutron/northbound/api/NeutronL2gatewayRequest.java b/northbound-api/src/main/java/org/opendaylight/neutron/northbound/api/NeutronL2gatewayRequest.java index 72ffcbb45..d568ad4ba 100644 --- a/northbound-api/src/main/java/org/opendaylight/neutron/northbound/api/NeutronL2gatewayRequest.java +++ b/northbound-api/src/main/java/org/opendaylight/neutron/northbound/api/NeutronL2gatewayRequest.java @@ -8,10 +8,12 @@ package org.opendaylight.neutron.northbound.api; +import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import java.util.List; import javax.xml.bind.annotation.XmlElement; import org.opendaylight.neutron.spi.NeutronL2gateway; +@SuppressFBWarnings("URF_UNREAD_FIELD") public final class NeutronL2gatewayRequest implements INeutronRequest { @XmlElement(name = "l2_gateway") NeutronL2gateway singleton; diff --git a/northbound-api/src/main/java/org/opendaylight/neutron/northbound/api/NeutronLoadBalancerHealthMonitorRequest.java b/northbound-api/src/main/java/org/opendaylight/neutron/northbound/api/NeutronLoadBalancerHealthMonitorRequest.java index b587ea19d..a23c74e40 100644 --- a/northbound-api/src/main/java/org/opendaylight/neutron/northbound/api/NeutronLoadBalancerHealthMonitorRequest.java +++ b/northbound-api/src/main/java/org/opendaylight/neutron/northbound/api/NeutronLoadBalancerHealthMonitorRequest.java @@ -8,6 +8,7 @@ package org.opendaylight.neutron.northbound.api; +import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import java.util.List; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; @@ -17,6 +18,7 @@ import org.opendaylight.neutron.spi.NeutronLoadBalancerHealthMonitor; @XmlRootElement @XmlAccessorType(XmlAccessType.NONE) +@SuppressFBWarnings("URF_UNREAD_FIELD") public final class NeutronLoadBalancerHealthMonitorRequest implements INeutronRequest { /** diff --git a/northbound-api/src/main/java/org/opendaylight/neutron/northbound/api/NeutronLoadBalancerListenerRequest.java b/northbound-api/src/main/java/org/opendaylight/neutron/northbound/api/NeutronLoadBalancerListenerRequest.java index 191f652bb..47756c27a 100644 --- a/northbound-api/src/main/java/org/opendaylight/neutron/northbound/api/NeutronLoadBalancerListenerRequest.java +++ b/northbound-api/src/main/java/org/opendaylight/neutron/northbound/api/NeutronLoadBalancerListenerRequest.java @@ -8,6 +8,7 @@ package org.opendaylight.neutron.northbound.api; +import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import java.util.List; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; @@ -17,6 +18,7 @@ import org.opendaylight.neutron.spi.NeutronLoadBalancerListener; @XmlRootElement @XmlAccessorType(XmlAccessType.NONE) +@SuppressFBWarnings("URF_UNREAD_FIELD") public final class NeutronLoadBalancerListenerRequest implements INeutronRequest { /** * See OpenStack Network API v2.0 Reference for description of the following link. diff --git a/northbound-api/src/main/java/org/opendaylight/neutron/northbound/api/NeutronLoadBalancerPoolMemberRequest.java b/northbound-api/src/main/java/org/opendaylight/neutron/northbound/api/NeutronLoadBalancerPoolMemberRequest.java index 800c31741..f9724cd43 100644 --- a/northbound-api/src/main/java/org/opendaylight/neutron/northbound/api/NeutronLoadBalancerPoolMemberRequest.java +++ b/northbound-api/src/main/java/org/opendaylight/neutron/northbound/api/NeutronLoadBalancerPoolMemberRequest.java @@ -8,10 +8,12 @@ package org.opendaylight.neutron.northbound.api; +import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import java.util.List; import javax.xml.bind.annotation.XmlElement; import org.opendaylight.neutron.spi.NeutronLoadBalancerPoolMember; +@SuppressFBWarnings("URF_UNREAD_FIELD") public final class NeutronLoadBalancerPoolMemberRequest implements INeutronRequest { /** * See OpenStack Network API v2.0 Reference for description of the following link. diff --git a/northbound-api/src/main/java/org/opendaylight/neutron/northbound/api/NeutronLoadBalancerPoolRequest.java b/northbound-api/src/main/java/org/opendaylight/neutron/northbound/api/NeutronLoadBalancerPoolRequest.java index 49dde24bf..2bfd997b6 100644 --- a/northbound-api/src/main/java/org/opendaylight/neutron/northbound/api/NeutronLoadBalancerPoolRequest.java +++ b/northbound-api/src/main/java/org/opendaylight/neutron/northbound/api/NeutronLoadBalancerPoolRequest.java @@ -8,6 +8,7 @@ package org.opendaylight.neutron.northbound.api; +import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import java.util.List; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; @@ -17,6 +18,7 @@ import org.opendaylight.neutron.spi.NeutronLoadBalancerPool; @XmlRootElement @XmlAccessorType(XmlAccessType.NONE) +@SuppressFBWarnings("URF_UNREAD_FIELD") public final class NeutronLoadBalancerPoolRequest implements INeutronRequest { /** * See OpenStack Network API v2.0 Reference for description of the following link. diff --git a/northbound-api/src/main/java/org/opendaylight/neutron/northbound/api/NeutronLoadBalancerRequest.java b/northbound-api/src/main/java/org/opendaylight/neutron/northbound/api/NeutronLoadBalancerRequest.java index 4b4c96ec4..1df94a654 100644 --- a/northbound-api/src/main/java/org/opendaylight/neutron/northbound/api/NeutronLoadBalancerRequest.java +++ b/northbound-api/src/main/java/org/opendaylight/neutron/northbound/api/NeutronLoadBalancerRequest.java @@ -8,6 +8,7 @@ package org.opendaylight.neutron.northbound.api; +import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import java.util.List; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; @@ -17,6 +18,7 @@ import org.opendaylight.neutron.spi.NeutronLoadBalancer; @XmlRootElement @XmlAccessorType(XmlAccessType.NONE) +@SuppressFBWarnings("URF_UNREAD_FIELD") public final class NeutronLoadBalancerRequest implements INeutronRequest { /** * See OpenStack Network API v2.0 Reference for description of the following link. diff --git a/northbound-api/src/main/java/org/opendaylight/neutron/northbound/api/NeutronMeteringLabelRequest.java b/northbound-api/src/main/java/org/opendaylight/neutron/northbound/api/NeutronMeteringLabelRequest.java index d179b8b81..750bf5d63 100644 --- a/northbound-api/src/main/java/org/opendaylight/neutron/northbound/api/NeutronMeteringLabelRequest.java +++ b/northbound-api/src/main/java/org/opendaylight/neutron/northbound/api/NeutronMeteringLabelRequest.java @@ -8,6 +8,7 @@ package org.opendaylight.neutron.northbound.api; +import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import java.util.List; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; @@ -17,6 +18,7 @@ import org.opendaylight.neutron.spi.NeutronMeteringLabel; @XmlRootElement @XmlAccessorType(XmlAccessType.NONE) +@SuppressFBWarnings("URF_UNREAD_FIELD") public final class NeutronMeteringLabelRequest implements INeutronRequest { // See OpenStack Network API v2.0 Reference for description of // annotated attributes diff --git a/northbound-api/src/main/java/org/opendaylight/neutron/northbound/api/NeutronMeteringLabelRuleRequest.java b/northbound-api/src/main/java/org/opendaylight/neutron/northbound/api/NeutronMeteringLabelRuleRequest.java index dc61ce234..42a104601 100644 --- a/northbound-api/src/main/java/org/opendaylight/neutron/northbound/api/NeutronMeteringLabelRuleRequest.java +++ b/northbound-api/src/main/java/org/opendaylight/neutron/northbound/api/NeutronMeteringLabelRuleRequest.java @@ -8,6 +8,7 @@ package org.opendaylight.neutron.northbound.api; +import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import java.util.List; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; @@ -17,6 +18,7 @@ import org.opendaylight.neutron.spi.NeutronMeteringLabelRule; @XmlRootElement @XmlAccessorType(XmlAccessType.NONE) +@SuppressFBWarnings("URF_UNREAD_FIELD") public final class NeutronMeteringLabelRuleRequest implements INeutronRequest { // See OpenStack Network API v2.0 Reference for description of // annotated attributes diff --git a/northbound-api/src/main/java/org/opendaylight/neutron/northbound/api/NeutronNetworkRequest.java b/northbound-api/src/main/java/org/opendaylight/neutron/northbound/api/NeutronNetworkRequest.java index ec77e9069..83578c39d 100644 --- a/northbound-api/src/main/java/org/opendaylight/neutron/northbound/api/NeutronNetworkRequest.java +++ b/northbound-api/src/main/java/org/opendaylight/neutron/northbound/api/NeutronNetworkRequest.java @@ -8,6 +8,7 @@ package org.opendaylight.neutron.northbound.api; +import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import java.util.List; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; @@ -17,6 +18,7 @@ import org.opendaylight.neutron.spi.NeutronNetwork; @XmlRootElement @XmlAccessorType(XmlAccessType.NONE) +@SuppressFBWarnings("URF_UNREAD_FIELD") public final class NeutronNetworkRequest implements INeutronRequest { // See OpenStack Network API v2.0 Reference for description of // annotated attributes diff --git a/northbound-api/src/main/java/org/opendaylight/neutron/northbound/api/NeutronPortRequest.java b/northbound-api/src/main/java/org/opendaylight/neutron/northbound/api/NeutronPortRequest.java index fda8a3541..c891c34ae 100644 --- a/northbound-api/src/main/java/org/opendaylight/neutron/northbound/api/NeutronPortRequest.java +++ b/northbound-api/src/main/java/org/opendaylight/neutron/northbound/api/NeutronPortRequest.java @@ -8,6 +8,7 @@ package org.opendaylight.neutron.northbound.api; +import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import java.util.List; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; @@ -17,6 +18,7 @@ import org.opendaylight.neutron.spi.NeutronPort; @XmlRootElement @XmlAccessorType(XmlAccessType.NONE) +@SuppressFBWarnings("URF_UNREAD_FIELD") public final class NeutronPortRequest implements INeutronRequest { // See OpenStack Network API v2.0 Reference for description of // annotated attributes diff --git a/northbound-api/src/main/java/org/opendaylight/neutron/northbound/api/NeutronQosPolicyRequest.java b/northbound-api/src/main/java/org/opendaylight/neutron/northbound/api/NeutronQosPolicyRequest.java index 29f53dc16..1d270e454 100644 --- a/northbound-api/src/main/java/org/opendaylight/neutron/northbound/api/NeutronQosPolicyRequest.java +++ b/northbound-api/src/main/java/org/opendaylight/neutron/northbound/api/NeutronQosPolicyRequest.java @@ -8,6 +8,7 @@ package org.opendaylight.neutron.northbound.api; +import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import java.util.List; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; @@ -17,6 +18,7 @@ import org.opendaylight.neutron.spi.NeutronQosPolicy; @XmlRootElement @XmlAccessorType(XmlAccessType.NONE) +@SuppressFBWarnings("URF_UNREAD_FIELD") public final class NeutronQosPolicyRequest implements INeutronRequest { @XmlElement(name = "policy") NeutronQosPolicy singleton; diff --git a/northbound-api/src/main/java/org/opendaylight/neutron/northbound/api/NeutronRouterRequest.java b/northbound-api/src/main/java/org/opendaylight/neutron/northbound/api/NeutronRouterRequest.java index d4c404d6b..4a07cad16 100644 --- a/northbound-api/src/main/java/org/opendaylight/neutron/northbound/api/NeutronRouterRequest.java +++ b/northbound-api/src/main/java/org/opendaylight/neutron/northbound/api/NeutronRouterRequest.java @@ -8,6 +8,7 @@ package org.opendaylight.neutron.northbound.api; +import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import java.util.List; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; @@ -17,6 +18,7 @@ import org.opendaylight.neutron.spi.NeutronRouter; @XmlRootElement @XmlAccessorType(XmlAccessType.NONE) +@SuppressFBWarnings("URF_UNREAD_FIELD") public final class NeutronRouterRequest implements INeutronRequest { // See OpenStack Network API v2.0 Reference for description of // annotated attributes diff --git a/northbound-api/src/main/java/org/opendaylight/neutron/northbound/api/NeutronSFCFlowClassifierRequest.java b/northbound-api/src/main/java/org/opendaylight/neutron/northbound/api/NeutronSFCFlowClassifierRequest.java index e026ce9b8..865b5c6ae 100644 --- a/northbound-api/src/main/java/org/opendaylight/neutron/northbound/api/NeutronSFCFlowClassifierRequest.java +++ b/northbound-api/src/main/java/org/opendaylight/neutron/northbound/api/NeutronSFCFlowClassifierRequest.java @@ -7,6 +7,7 @@ */ package org.opendaylight.neutron.northbound.api; +import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import java.util.List; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; @@ -16,6 +17,7 @@ import org.opendaylight.neutron.spi.NeutronSFCFlowClassifier; @XmlRootElement @XmlAccessorType(XmlAccessType.NONE) +@SuppressFBWarnings("URF_UNREAD_FIELD") public final class NeutronSFCFlowClassifierRequest implements INeutronRequest { // See OpenStack Networking SFC (networking-sfc) API v1.0 Reference for description of // annotated attributes diff --git a/northbound-api/src/main/java/org/opendaylight/neutron/northbound/api/NeutronSFCPortChainRequest.java b/northbound-api/src/main/java/org/opendaylight/neutron/northbound/api/NeutronSFCPortChainRequest.java index 910085c62..5a6eba03e 100644 --- a/northbound-api/src/main/java/org/opendaylight/neutron/northbound/api/NeutronSFCPortChainRequest.java +++ b/northbound-api/src/main/java/org/opendaylight/neutron/northbound/api/NeutronSFCPortChainRequest.java @@ -7,6 +7,7 @@ */ package org.opendaylight.neutron.northbound.api; +import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import java.util.List; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; @@ -16,6 +17,7 @@ import org.opendaylight.neutron.spi.NeutronSFCPortChain; @XmlRootElement @XmlAccessorType(XmlAccessType.NONE) +@SuppressFBWarnings("URF_UNREAD_FIELD") public final class NeutronSFCPortChainRequest implements INeutronRequest { // See OpenStack Networking SFC (networking-sfc) Port Chain API v1.0 Reference // for description of annotated attributes diff --git a/northbound-api/src/main/java/org/opendaylight/neutron/northbound/api/NeutronSFCPortPairGroupRequest.java b/northbound-api/src/main/java/org/opendaylight/neutron/northbound/api/NeutronSFCPortPairGroupRequest.java index 844e44580..d54cecb99 100644 --- a/northbound-api/src/main/java/org/opendaylight/neutron/northbound/api/NeutronSFCPortPairGroupRequest.java +++ b/northbound-api/src/main/java/org/opendaylight/neutron/northbound/api/NeutronSFCPortPairGroupRequest.java @@ -7,6 +7,7 @@ */ package org.opendaylight.neutron.northbound.api; +import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import java.util.List; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; @@ -16,6 +17,7 @@ import org.opendaylight.neutron.spi.NeutronSFCPortPairGroup; @XmlRootElement @XmlAccessorType(XmlAccessType.NONE) +@SuppressFBWarnings("URF_UNREAD_FIELD") public final class NeutronSFCPortPairGroupRequest implements INeutronRequest { // See OpenStack Networking SFC (networking-sfc) Port Pair Group API v1.0 Reference // for description of annotated attributes diff --git a/northbound-api/src/main/java/org/opendaylight/neutron/northbound/api/NeutronSFCPortPairRequest.java b/northbound-api/src/main/java/org/opendaylight/neutron/northbound/api/NeutronSFCPortPairRequest.java index 587fd06d8..30382fd85 100644 --- a/northbound-api/src/main/java/org/opendaylight/neutron/northbound/api/NeutronSFCPortPairRequest.java +++ b/northbound-api/src/main/java/org/opendaylight/neutron/northbound/api/NeutronSFCPortPairRequest.java @@ -7,6 +7,7 @@ */ package org.opendaylight.neutron.northbound.api; +import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import java.util.List; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; @@ -16,6 +17,7 @@ import org.opendaylight.neutron.spi.NeutronSFCPortPair; @XmlRootElement @XmlAccessorType(XmlAccessType.NONE) +@SuppressFBWarnings("URF_UNREAD_FIELD") public final class NeutronSFCPortPairRequest implements INeutronRequest { // See OpenStack Networking SFC (networking-sfc) Port Pair API v1.0 Reference // for description of annotated attributes diff --git a/northbound-api/src/main/java/org/opendaylight/neutron/northbound/api/NeutronSecurityGroupRequest.java b/northbound-api/src/main/java/org/opendaylight/neutron/northbound/api/NeutronSecurityGroupRequest.java index 0a8771bd3..3ef3e40f9 100644 --- a/northbound-api/src/main/java/org/opendaylight/neutron/northbound/api/NeutronSecurityGroupRequest.java +++ b/northbound-api/src/main/java/org/opendaylight/neutron/northbound/api/NeutronSecurityGroupRequest.java @@ -8,6 +8,7 @@ package org.opendaylight.neutron.northbound.api; +import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import java.util.List; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; @@ -17,6 +18,7 @@ import org.opendaylight.neutron.spi.NeutronSecurityGroup; @XmlRootElement @XmlAccessorType(XmlAccessType.NONE) +@SuppressFBWarnings("URF_UNREAD_FIELD") public final class NeutronSecurityGroupRequest implements INeutronRequest { /** * See OpenStack Network API v2.0 Reference for a diff --git a/northbound-api/src/main/java/org/opendaylight/neutron/northbound/api/NeutronSecurityRuleRequest.java b/northbound-api/src/main/java/org/opendaylight/neutron/northbound/api/NeutronSecurityRuleRequest.java index da12fd38a..ec91da735 100644 --- a/northbound-api/src/main/java/org/opendaylight/neutron/northbound/api/NeutronSecurityRuleRequest.java +++ b/northbound-api/src/main/java/org/opendaylight/neutron/northbound/api/NeutronSecurityRuleRequest.java @@ -8,6 +8,7 @@ package org.opendaylight.neutron.northbound.api; +import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import java.util.List; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; @@ -17,6 +18,7 @@ import org.opendaylight.neutron.spi.NeutronSecurityRule; @XmlRootElement @XmlAccessorType(XmlAccessType.NONE) +@SuppressFBWarnings("URF_UNREAD_FIELD") public final class NeutronSecurityRuleRequest implements INeutronRequest { /** * See OpenStack Network API v2.0 Reference for a diff --git a/northbound-api/src/main/java/org/opendaylight/neutron/northbound/api/NeutronSubnetRequest.java b/northbound-api/src/main/java/org/opendaylight/neutron/northbound/api/NeutronSubnetRequest.java index 2a5806c0a..aebf5454b 100644 --- a/northbound-api/src/main/java/org/opendaylight/neutron/northbound/api/NeutronSubnetRequest.java +++ b/northbound-api/src/main/java/org/opendaylight/neutron/northbound/api/NeutronSubnetRequest.java @@ -8,6 +8,7 @@ package org.opendaylight.neutron.northbound.api; +import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import java.util.List; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; @@ -17,6 +18,7 @@ import org.opendaylight.neutron.spi.NeutronSubnet; @XmlRootElement @XmlAccessorType(XmlAccessType.NONE) +@SuppressFBWarnings("URF_UNREAD_FIELD") public final class NeutronSubnetRequest implements INeutronRequest { // See OpenStack Network API v2.0 Reference for description of // annotated attributes diff --git a/northbound-api/src/main/java/org/opendaylight/neutron/northbound/api/NeutronTapFlowRequest.java b/northbound-api/src/main/java/org/opendaylight/neutron/northbound/api/NeutronTapFlowRequest.java index d124d821a..b09e1e97e 100644 --- a/northbound-api/src/main/java/org/opendaylight/neutron/northbound/api/NeutronTapFlowRequest.java +++ b/northbound-api/src/main/java/org/opendaylight/neutron/northbound/api/NeutronTapFlowRequest.java @@ -8,6 +8,7 @@ package org.opendaylight.neutron.northbound.api; +import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import java.util.List; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; @@ -17,6 +18,7 @@ import org.opendaylight.neutron.spi.NeutronTapFlow; @XmlRootElement @XmlAccessorType(XmlAccessType.NONE) +@SuppressFBWarnings("URF_UNREAD_FIELD") public final class NeutronTapFlowRequest implements INeutronRequest { @XmlElement(name = "tap_flow") NeutronTapFlow singleton; diff --git a/northbound-api/src/main/java/org/opendaylight/neutron/northbound/api/NeutronTapServiceRequest.java b/northbound-api/src/main/java/org/opendaylight/neutron/northbound/api/NeutronTapServiceRequest.java index 456e5dd2b..983352932 100644 --- a/northbound-api/src/main/java/org/opendaylight/neutron/northbound/api/NeutronTapServiceRequest.java +++ b/northbound-api/src/main/java/org/opendaylight/neutron/northbound/api/NeutronTapServiceRequest.java @@ -8,6 +8,7 @@ package org.opendaylight.neutron.northbound.api; +import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import java.util.List; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; @@ -17,6 +18,7 @@ import org.opendaylight.neutron.spi.NeutronTapService; @XmlRootElement @XmlAccessorType(XmlAccessType.NONE) +@SuppressFBWarnings("URF_UNREAD_FIELD") public final class NeutronTapServiceRequest implements INeutronRequest { @XmlElement(name = "tap_service") NeutronTapService singleton; diff --git a/northbound-api/src/main/java/org/opendaylight/neutron/northbound/api/NeutronTrunkRequest.java b/northbound-api/src/main/java/org/opendaylight/neutron/northbound/api/NeutronTrunkRequest.java index 884611152..4e925eb31 100644 --- a/northbound-api/src/main/java/org/opendaylight/neutron/northbound/api/NeutronTrunkRequest.java +++ b/northbound-api/src/main/java/org/opendaylight/neutron/northbound/api/NeutronTrunkRequest.java @@ -8,6 +8,7 @@ package org.opendaylight.neutron.northbound.api; +import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import java.util.List; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; @@ -17,6 +18,7 @@ import org.opendaylight.neutron.spi.NeutronTrunk; @XmlRootElement @XmlAccessorType(XmlAccessType.NONE) +@SuppressFBWarnings("URF_UNREAD_FIELD") public final class NeutronTrunkRequest implements INeutronRequest { @XmlElement(name = "trunk") diff --git a/northbound-api/src/main/java/org/opendaylight/neutron/northbound/api/NeutronVpnIkePolicyRequest.java b/northbound-api/src/main/java/org/opendaylight/neutron/northbound/api/NeutronVpnIkePolicyRequest.java index 3ab9b90b6..e46a368e0 100644 --- a/northbound-api/src/main/java/org/opendaylight/neutron/northbound/api/NeutronVpnIkePolicyRequest.java +++ b/northbound-api/src/main/java/org/opendaylight/neutron/northbound/api/NeutronVpnIkePolicyRequest.java @@ -8,6 +8,7 @@ package org.opendaylight.neutron.northbound.api; +import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import java.util.List; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; @@ -17,6 +18,7 @@ import org.opendaylight.neutron.spi.NeutronVpnIkePolicy; @XmlRootElement @XmlAccessorType(XmlAccessType.NONE) +@SuppressFBWarnings("URF_UNREAD_FIELD") public final class NeutronVpnIkePolicyRequest implements INeutronRequest { @XmlElement(name = "ikepolicy") NeutronVpnIkePolicy singleton; diff --git a/northbound-api/src/main/java/org/opendaylight/neutron/northbound/api/NeutronVpnIpSecPolicyRequest.java b/northbound-api/src/main/java/org/opendaylight/neutron/northbound/api/NeutronVpnIpSecPolicyRequest.java index 276293d6c..07fafda9f 100644 --- a/northbound-api/src/main/java/org/opendaylight/neutron/northbound/api/NeutronVpnIpSecPolicyRequest.java +++ b/northbound-api/src/main/java/org/opendaylight/neutron/northbound/api/NeutronVpnIpSecPolicyRequest.java @@ -8,6 +8,7 @@ package org.opendaylight.neutron.northbound.api; +import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import java.util.List; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; @@ -17,6 +18,7 @@ import org.opendaylight.neutron.spi.NeutronVpnIpSecPolicy; @XmlRootElement @XmlAccessorType(XmlAccessType.NONE) +@SuppressFBWarnings("URF_UNREAD_FIELD") public final class NeutronVpnIpSecPolicyRequest implements INeutronRequest { @XmlElement(name = "ipsecpolicy") NeutronVpnIpSecPolicy singleton; diff --git a/northbound-api/src/main/java/org/opendaylight/neutron/northbound/api/NeutronVpnIpSecSiteConnectionRequest.java b/northbound-api/src/main/java/org/opendaylight/neutron/northbound/api/NeutronVpnIpSecSiteConnectionRequest.java index c632aea81..a2337bc60 100644 --- a/northbound-api/src/main/java/org/opendaylight/neutron/northbound/api/NeutronVpnIpSecSiteConnectionRequest.java +++ b/northbound-api/src/main/java/org/opendaylight/neutron/northbound/api/NeutronVpnIpSecSiteConnectionRequest.java @@ -8,6 +8,7 @@ package org.opendaylight.neutron.northbound.api; +import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import java.util.List; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; @@ -17,6 +18,7 @@ import org.opendaylight.neutron.spi.NeutronVpnIpSecSiteConnection; @XmlRootElement @XmlAccessorType(XmlAccessType.NONE) +@SuppressFBWarnings("URF_UNREAD_FIELD") public final class NeutronVpnIpSecSiteConnectionRequest implements INeutronRequest { @XmlElement(name = "ipsec_site_connection") NeutronVpnIpSecSiteConnection singleton; diff --git a/northbound-api/src/main/java/org/opendaylight/neutron/northbound/api/NeutronVpnServiceRequest.java b/northbound-api/src/main/java/org/opendaylight/neutron/northbound/api/NeutronVpnServiceRequest.java index 809a354c9..374a6d44e 100644 --- a/northbound-api/src/main/java/org/opendaylight/neutron/northbound/api/NeutronVpnServiceRequest.java +++ b/northbound-api/src/main/java/org/opendaylight/neutron/northbound/api/NeutronVpnServiceRequest.java @@ -8,6 +8,7 @@ package org.opendaylight.neutron.northbound.api; +import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; import java.util.List; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; @@ -17,6 +18,7 @@ import org.opendaylight.neutron.spi.NeutronVpnService; @XmlRootElement @XmlAccessorType(XmlAccessType.NONE) +@SuppressFBWarnings("URF_UNREAD_FIELD") public final class NeutronVpnServiceRequest implements INeutronRequest { @XmlElement(name = "vpnservice") NeutronVpnService singleton; diff --git a/northbound-api/src/main/java/org/opendaylight/neutron/northbound/api/PaginatedRequestFactory.java b/northbound-api/src/main/java/org/opendaylight/neutron/northbound/api/PaginatedRequestFactory.java index 129536312..78ae301c6 100644 --- a/northbound-api/src/main/java/org/opendaylight/neutron/northbound/api/PaginatedRequestFactory.java +++ b/northbound-api/src/main/java/org/opendaylight/neutron/northbound/api/PaginatedRequestFactory.java @@ -21,12 +21,8 @@ import org.opendaylight.neutron.spi.NeutronSubnet; public final class PaginatedRequestFactory { - private static final Comparator NEUTRON_OBJECT_COMPARATOR = new Comparator() { - @Override - public int compare(INeutronObject o1, INeutronObject o2) { - return o1.getID().compareTo(o2.getID()); - } - }; + private static final Comparator> NEUTRON_OBJECT_COMPARATOR = + (o1, o2) -> o1.getID().compareTo(o2.getID()); public static class PaginationResults> { List collection; @@ -38,8 +34,9 @@ public final class PaginatedRequestFactory { } } - private static final class MarkerObject extends NeutronObject - implements INeutronObject { + private static final class MarkerObject extends NeutronObject { + private static final long serialVersionUID = 1L; + private final String id; MarkerObject(String id) { diff --git a/transcriber/src/main/java/org/opendaylight/neutron/transcriber/NeutronL2gatewayConnectionInterface.java b/transcriber/src/main/java/org/opendaylight/neutron/transcriber/NeutronL2gatewayConnectionInterface.java index 67eafbd23..3bbcdb486 100644 --- a/transcriber/src/main/java/org/opendaylight/neutron/transcriber/NeutronL2gatewayConnectionInterface.java +++ b/transcriber/src/main/java/org/opendaylight/neutron/transcriber/NeutronL2gatewayConnectionInterface.java @@ -43,7 +43,7 @@ public final class NeutronL2gatewayConnectionInterface result.setNetworkID(String.valueOf(l2gatewayConnection.getNetworkId().getValue())); } if (l2gatewayConnection.getSegmentId() != null) { - result.setSegmentID(Integer.valueOf(l2gatewayConnection.getSegmentId())); + result.setSegmentID(l2gatewayConnection.getSegmentId()); } if (l2gatewayConnection.getPortId() != null) { result.setPortID(String.valueOf(l2gatewayConnection.getPortId().getValue())); @@ -63,7 +63,7 @@ public final class NeutronL2gatewayConnectionInterface l2gatewayConnectionBuilder.setNetworkId(toUuid(neutronObject.getNetworkID())); } if (neutronObject.getSegmentID() != null) { - l2gatewayConnectionBuilder.setSegmentId((neutronObject.getSegmentID())); + l2gatewayConnectionBuilder.setSegmentId(neutronObject.getSegmentID()); } if (neutronObject.getPortID() != null) { l2gatewayConnectionBuilder.setPortId(toUuid(neutronObject.getPortID())); diff --git a/transcriber/src/main/java/org/opendaylight/neutron/transcriber/NeutronL2gatewayInterface.java b/transcriber/src/main/java/org/opendaylight/neutron/transcriber/NeutronL2gatewayInterface.java index bed0b6dea..a8658dc31 100644 --- a/transcriber/src/main/java/org/opendaylight/neutron/transcriber/NeutronL2gatewayInterface.java +++ b/transcriber/src/main/java/org/opendaylight/neutron/transcriber/NeutronL2gatewayInterface.java @@ -47,7 +47,7 @@ public final class NeutronL2gatewayInterface final NeutronL2gatewayDevice neutronL2gatewayDevice = new NeutronL2gatewayDevice(); final List neutronL2gatewayDeviceInterfaces = new ArrayList<>(); if (device.getDeviceName() != null) { - neutronL2gatewayDevice.setDeviceName(device.getDeviceName().toString()); + neutronL2gatewayDevice.setDeviceName(device.getDeviceName()); } if (device.getUuid() != null) { neutronL2gatewayDevice.setID(device.getUuid().getValue()); @@ -59,7 +59,7 @@ public final class NeutronL2gatewayInterface String interfaceName = null; final List segmentationIds = new ArrayList<>(); if (deviceInterface.getInterfaceName() != null) { - interfaceName = deviceInterface.getInterfaceName().toString(); + interfaceName = deviceInterface.getInterfaceName(); } if (deviceInterface.getSegmentationIds() != null) { for (final Integer segmentId : deviceInterface.getSegmentationIds()) { diff --git a/transcriber/src/main/java/org/opendaylight/neutron/transcriber/NeutronLoadBalancerHealthMonitorInterface.java b/transcriber/src/main/java/org/opendaylight/neutron/transcriber/NeutronLoadBalancerHealthMonitorInterface.java index 959e2cce4..71f9f8216 100644 --- a/transcriber/src/main/java/org/opendaylight/neutron/transcriber/NeutronLoadBalancerHealthMonitorInterface.java +++ b/transcriber/src/main/java/org/opendaylight/neutron/transcriber/NeutronLoadBalancerHealthMonitorInterface.java @@ -63,7 +63,7 @@ public final class NeutronLoadBalancerHealthMonitorInterface healthmonitorBuilder.setHttpMethod(healthMonitor.getLoadBalancerHealthMonitorHttpMethod()); } if (healthMonitor.getLoadBalancerHealthMonitorMaxRetries() != null) { - healthmonitorBuilder.setMaxRetries(Integer.valueOf(healthMonitor.getLoadBalancerHealthMonitorMaxRetries())); + healthmonitorBuilder.setMaxRetries(healthMonitor.getLoadBalancerHealthMonitorMaxRetries()); } if (healthMonitor.getLoadBalancerHealthMonitorPools() != null) { final List listUuid = new ArrayList<>(); @@ -103,7 +103,7 @@ public final class NeutronLoadBalancerHealthMonitorInterface answer.setLoadBalancerHealthMonitorHttpMethod(healthMonitor.getHttpMethod()); } if (healthMonitor.getMaxRetries() != null) { - answer.setLoadBalancerHealthMonitorMaxRetries(Integer.valueOf(healthMonitor.getMaxRetries())); + answer.setLoadBalancerHealthMonitorMaxRetries(healthMonitor.getMaxRetries()); } if (healthMonitor.getPools() != null) { final List list = new ArrayList<>(); diff --git a/transcriber/src/main/java/org/opendaylight/neutron/transcriber/NeutronSecurityRuleInterface.java b/transcriber/src/main/java/org/opendaylight/neutron/transcriber/NeutronSecurityRuleInterface.java index 4808007bb..63d4d1ce2 100644 --- a/transcriber/src/main/java/org/opendaylight/neutron/transcriber/NeutronSecurityRuleInterface.java +++ b/transcriber/src/main/java/org/opendaylight/neutron/transcriber/NeutronSecurityRuleInterface.java @@ -76,10 +76,10 @@ public final class NeutronSecurityRuleInterface extends answer.setSecurityRuleEthertype(ETHERTYPE_MAP.get(rule.getEthertype())); } if (rule.getPortRangeMin() != null) { - answer.setSecurityRulePortMin(Integer.valueOf(rule.getPortRangeMin())); + answer.setSecurityRulePortMin(rule.getPortRangeMin()); } if (rule.getPortRangeMax() != null) { - answer.setSecurityRulePortMax(Integer.valueOf(rule.getPortRangeMax())); + answer.setSecurityRulePortMax(rule.getPortRangeMax()); } return answer; } @@ -119,10 +119,10 @@ public final class NeutronSecurityRuleInterface extends .setEthertype(mapper.get(securityRule.getSecurityRuleEthertype())); } if (securityRule.getSecurityRulePortMin() != null) { - securityRuleBuilder.setPortRangeMin(Integer.valueOf(securityRule.getSecurityRulePortMin())); + securityRuleBuilder.setPortRangeMin(securityRule.getSecurityRulePortMin()); } if (securityRule.getSecurityRulePortMax() != null) { - securityRuleBuilder.setPortRangeMax(Integer.valueOf(securityRule.getSecurityRulePortMax())); + securityRuleBuilder.setPortRangeMax(securityRule.getSecurityRulePortMax()); } return securityRuleBuilder.build(); }