BUG-4622: Sending Empty Optional Attributes 48/29548/12
authorClaudio D. Gasparini <cgaspari@cisco.com>
Wed, 11 Nov 2015 12:23:46 +0000 (13:23 +0100)
committerGerrit Code Review <gerrit@opendaylight.org>
Sat, 14 Nov 2015 09:21:34 +0000 (09:21 +0000)
commite360530c9cfe031bb9deeb11e334e45477c1943f
tree9c413d2642d777d9f9898245d4f1943831ce84dc
parent52daee8426a92fef6d858e4052f9a70cfdc1e202
BUG-4622: Sending Empty Optional Attributes

Some of the parsers of Optional Attributes
only take in account the possibility of null
attribute and not of an empty one.
Fix by check it and dont parse them in case of
empty or null.

Change-Id: I34d801a001ed167e18646e228b9b9dfc03f7c882
Signed-off-by: Claudio D. Gasparini <cgaspari@cisco.com>
bgp/parser-impl/src/main/java/org/opendaylight/protocol/bgp/parser/impl/message/update/ClusterIdAttributeParser.java
bgp/parser-impl/src/main/java/org/opendaylight/protocol/bgp/parser/impl/message/update/CommunitiesAttributeParser.java
bgp/parser-impl/src/main/java/org/opendaylight/protocol/bgp/parser/impl/message/update/ExtendedCommunitiesAttributeParser.java
bgp/parser-impl/src/test/java/org/opendaylight/protocol/bgp/parser/impl/message/update/ClusterIdAttributeParserTest.java [new file with mode: 0644]
bgp/parser-impl/src/test/java/org/opendaylight/protocol/bgp/parser/impl/message/update/CommunitiesAttributeParserTest.java [new file with mode: 0644]
bgp/parser-impl/src/test/java/org/opendaylight/protocol/bgp/parser/impl/message/update/ExtendedCommunitiesAttributeParserTest.java
bgp/rib-impl/src/main/java/org/opendaylight/protocol/bgp/rib/impl/AttributeOperations.java