fix CheckedFutures deprecated warnings 08/83608/2
authorguillaume.lambert <guillaume.lambert@orange.com>
Wed, 14 Aug 2019 07:49:58 +0000 (09:49 +0200)
committerguillaume.lambert <guillaume.lambert@orange.com>
Mon, 19 Aug 2019 14:28:24 +0000 (16:28 +0200)
commit7600ff43d8769cc58fd46d908f29d39129133853
treecde4e1479339f82eb3874da6fe954a3fa9c63f3c
parentc5fc25e73679127ad29a5196410f24b50dcc8f7d
fix CheckedFutures deprecated warnings

com.google.common.util.concurrent.CheckedFuture is deprecated.
Netconf switched to new MD-SAL APIs that rely now on FluentFuture.

https://git.opendaylight.org/gerrit/c/netconf/+/78424
https://git.opendaylight.org/gerrit/c/netconf/+/78425
https://git.opendaylight.org/gerrit/c/controller/+/80412

- switch to FluentFuture or ListenableFuture when possible.
- ReadFailedException removed since not managed by ListenableFuture.
- When mocking MD-SAL APIs, switch to FluentFuture and doReturn().when()
  since when().thenReturn() raises an error with FluentFuture.
- checkGet catched by TransactionCommitFailedException replaced by
  (Future.)get catched by InterruptedException and ExecutionException

- improve by the way common.network.RequestProcessor logs syntax

TODO: remove makeChecked use from Junit DeviceTransactionManagerTest

Signed-off-by: guillaume.lambert <guillaume.lambert@orange.com>
Change-Id: I138268e9a117306107f5a7c30093b7b3132fa9c9
common/src/main/java/org/opendaylight/transportpce/common/device/DeviceTransaction.java
common/src/main/java/org/opendaylight/transportpce/common/mapping/PortMappingVersion121.java
common/src/main/java/org/opendaylight/transportpce/common/mapping/PortMappingVersion221.java
common/src/main/java/org/opendaylight/transportpce/common/network/NetworkTransactionImpl.java
common/src/main/java/org/opendaylight/transportpce/common/network/NetworkTransactionService.java
common/src/main/java/org/opendaylight/transportpce/common/network/RequestProcessor.java
common/src/test/java/org/opendaylight/transportpce/common/device/DeviceTransactionManagerTest.java
networkmodel/src/main/java/org/opendaylight/transportpce/networkmodel/Rdm2XpdrLink.java