summaryrefslogtreecommitdiffstats
path: root/ipsec/ipsec-impl
diff options
context:
space:
mode:
authorMichal Cmarada <mcmarada@cisco.com>2019-06-04 17:44:32 +0200
committerMichal Cmarada <mcmarada@cisco.com>2019-06-04 17:44:32 +0200
commite2746559f42636e667513024c85c9a6a20de0634 (patch)
tree3f16fda0f87d53d5c84ac117f67da58a2b93c7d9 /ipsec/ipsec-impl
parent27c59c4083cb300f528d63b3e3924c348dd090e0 (diff)
fix sonar issues
- fixes issues for wrong modifier order - fixes wrong @Nonnull annotations in AclReader - fixes unnecessary boxing to Long Change-Id: I5713d81f24d21cbefcc5cf3398e75c14e0526f6c Signed-off-by: Michal Cmarada <mcmarada@cisco.com>
Diffstat (limited to 'ipsec/ipsec-impl')
-rw-r--r--ipsec/ipsec-impl/src/main/java/io/fd/hc2vpp/ipsec/read/IpsecStateCustomizer.java9
1 files changed, 2 insertions, 7 deletions
diff --git a/ipsec/ipsec-impl/src/main/java/io/fd/hc2vpp/ipsec/read/IpsecStateCustomizer.java b/ipsec/ipsec-impl/src/main/java/io/fd/hc2vpp/ipsec/read/IpsecStateCustomizer.java
index 3148d144b..2049e6144 100644
--- a/ipsec/ipsec-impl/src/main/java/io/fd/hc2vpp/ipsec/read/IpsecStateCustomizer.java
+++ b/ipsec/ipsec-impl/src/main/java/io/fd/hc2vpp/ipsec/read/IpsecStateCustomizer.java
@@ -87,7 +87,7 @@ public class IpsecStateCustomizer extends FutureJVppCustomizer
for (IpsecSaDetails details : reply.ipsecSaDetails) {
SaBuilder saBuilder = new SaBuilder();
saBuilder.setSpi(Integer.toUnsignedLong(details.entry.spi))
- .setAntiReplayWindow(Long.valueOf(details.replayWindow).intValue())
+ .setAntiReplayWindow((int) details.replayWindow)
.setAuthenticationAlgorithm(parseAuthAlgorithm(details.entry.integrityAlgorithm))
.setEncryptionAlgorithm(parseCryptoAlgorithm(details.entry.cryptoAlgorithm));
listSa.add(saBuilder.build());
@@ -106,14 +106,10 @@ public class IpsecStateCustomizer extends FutureJVppCustomizer
return IkeEncryptionAlgorithmT.EncrAesCbc192;
case IPSEC_API_CRYPTO_ALG_AES_CBC_256:
return IkeEncryptionAlgorithmT.EncrAesCbc256;
+ // todo verify Cryptoalgorithms
case IPSEC_API_CRYPTO_ALG_AES_CTR_128:
- // todo verify Cryptoalgorithms
- return IkeEncryptionAlgorithmT.EncrAesCtr;
case IPSEC_API_CRYPTO_ALG_AES_CTR_192:
- // todo verify Cryptoalgorithms
- return IkeEncryptionAlgorithmT.EncrAesCtr;
case IPSEC_API_CRYPTO_ALG_AES_CTR_256:
- // todo verify Cryptoalgorithms
return IkeEncryptionAlgorithmT.EncrAesCtr;
case IPSEC_API_CRYPTO_ALG_AES_GCM_128:
return IkeEncryptionAlgorithmT.EncrAesGcm8Icv;
@@ -122,7 +118,6 @@ public class IpsecStateCustomizer extends FutureJVppCustomizer
case IPSEC_API_CRYPTO_ALG_AES_GCM_256:
return IkeEncryptionAlgorithmT.EncrAesGcm16Icv;
case IPSEC_API_CRYPTO_ALG_DES_CBC:
- // todo verify Cryptoalgorithms
return IkeEncryptionAlgorithmT.EncrDes;
case IPSEC_API_CRYPTO_ALG_3DES_CBC:
return IkeEncryptionAlgorithmT.Encr3des;