Fix Sonar issue: Code readability 02/56602/4
authormcauffiez <mcauffiez@inocybe.com>
Fri, 5 May 2017 14:43:43 +0000 (10:43 -0400)
committermcauffiez <mcauffiez@inocybe.com>
Wed, 10 May 2017 14:20:40 +0000 (10:20 -0400)
commit2616197d5d3e3882437aa8972d8ae9493c24d7f0
treefca4a3e3156f059ba45bfc90cf17f241eead9e80
parentcf6ad21ed78ca6cf0bded50d4bd276c8ee892310
Fix Sonar issue: Code readability

Adress Major sonar issues for NeutronHostconfigVppListener.java file.
This patch improves code readability.

Use final temporary var instead of using the method parameter
vhostMode.
Reduce the lambda content by creating a new method:
processDataTreeModification.
Reduce the cyclomatic complexity of validateVppNode by adding the
boolean function isCapabilitiesPresent.

Change-Id: Ie2b3fa85772707f8c86901415dd1ca8d0a7eef47
Signed-off-by: mcauffiez <mcauffiez@inocybe.com>
neutron-hostconfig/vpp/src/main/java/org/opendaylight/neutron/hostconfig/vpp/NeutronHostconfigVppListener.java