Improve findSingleCapability() 57/111257/1
authorRobert Varga <robert.varga@pantheon.tech>
Thu, 4 Apr 2024 05:46:10 +0000 (07:46 +0200)
committerRobert Varga <robert.varga@pantheon.tech>
Thu, 4 Apr 2024 06:05:57 +0000 (08:05 +0200)
commit9b2f6b980acfb05c078caa06a4c706c7b9bc05b9
tree5c33b76f68e843d7a28ca117c793239d79373412
parentfd9f0c9e15f35a7c0c9ca48ad8535efe11849791
Improve findSingleCapability()

We can use a switch expression, improving readability. Furthermore we
can ditch the use of Optional by passing the empty value around.

Change-Id: I08caba1304b382ec4499c3c000aa51532303d3f0
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
bgp/rib-impl/src/main/java/org/opendaylight/protocol/bgp/rib/impl/BGPSessionImpl.java