Modernize codebase 32/106832/2
authorRobert Varga <robert.varga@pantheon.tech>
Wed, 5 Jul 2023 22:55:12 +0000 (00:55 +0200)
committerRobert Varga <robert.varga@pantheon.tech>
Wed, 5 Jul 2023 23:23:55 +0000 (01:23 +0200)
commit21c984447de25eb251e2ed51b64f9ef486e8c3a4
tree4be15c31a1dcbf5e62bddc4ae28ef7acf322dd13
parentf3a5966392b79ff8db678b170d83b4b4bdceb40f
Modernize codebase

Use following constructs:
- Optional.orElseThrow()
- BindingMap.of()
- List.of()

Also do not mock binding constructs, but rather rely of builders to
provide completely-functioning implementations.

Change-Id: Ie0753166443bdf85e7437e7911a8d3f91afc0efe
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
17 files changed:
openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/device/DeviceContextImpl.java
openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/lifecycle/ContextChainHolderImpl.java
openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/statistics/StatisticsGatheringUtils.java
openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/device/initialization/DeviceInitializerProviderTest.java
openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/protocol/deserialization/multipart/TableFeaturesMatchFieldDeserializerTest.java
openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/statistics/MultipartReplyTranslatorTest.java
openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/statistics/StatisticsGatheringUtilsTest.java
openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/statistics/services/direct/multilayer/FlowDirectStatisticsServiceTest.java
openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/statistics/services/direct/multilayer/GroupDirectStatisticsServiceTest.java
openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/statistics/services/direct/multilayer/MeterDirectStatisticsServiceTest.java
openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/statistics/services/direct/multilayer/NodeConnectorDirectStatisticsServiceTest.java
openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/statistics/services/direct/multilayer/QueueDirectStatisticsServiceTest.java
openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/statistics/services/direct/singlelayer/FlowDirectStatisticsServiceTest.java
openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/statistics/services/direct/singlelayer/GroupDirectStatisticsServiceTest.java
openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/statistics/services/direct/singlelayer/MeterDirectStatisticsServiceTest.java
openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/statistics/services/direct/singlelayer/NodeConnectorDirectStatisticsServiceTest.java
openflowplugin-impl/src/test/java/org/opendaylight/openflowplugin/impl/statistics/services/direct/singlelayer/QueueDirectStatisticsServiceTest.java