Sonar clean-up: OF13Provider
authorStephen Kitt <skitt@redhat.com>
Fri, 17 Jul 2015 13:30:06 +0000 (15:30 +0200)
committerStephen Kitt <skitt@redhat.com>
Mon, 20 Jul 2015 11:16:38 +0000 (13:16 +0200)
commitb529edbff321502b2f3ce07502ae5c85f4ff2844
tree9d88d5c72278d879b735929495918d83179ebd56
parent5938e36b2cb36324c07750d182d47bfd30ffbf2e
Sonar clean-up: OF13Provider

This class contains lots of methods with unused parameters, but they
follow a pattern so override that instead of cleaning up the
parameters.

Dead-code elimination (unused methods, unnecessary initialisations).
Code which corresponds to comment method calls is marked as such so
it no longers causes Sonar warnings (with a TODO added to check the
call sites).

getTunnelReadinessStatus() appears unused but is tested for in the
corresponding unit-test class, so keep it for now and override the
unused warning.

Long dpid -> long dpid.

if (!local) {} if (local) {} -> if (!local) {} else {} (the value of
local doesn't change in the first block).

networkingProviderManager is initialised and used in a single method,
so convert it to a local variable and adjust the corresponding test.

Return value simplification (? true : false isn't necessary).

<> operator in OF13ProviderTest.

Change-Id: Ibf74d332257f063ffc603e663b1707829ddaa6e3
Signed-off-by: Stephen Kitt <skitt@redhat.com>
openstack/net-virt-providers/src/main/java/org/opendaylight/ovsdb/openstack/netvirt/providers/openflow13/OF13Provider.java
openstack/net-virt-providers/src/test/java/org/opendaylight/ovsdb/openstack/netvirt/providers/openflow13/OF13ProviderTest.java