Skip to content

Commit 104cde6

Browse files
Merge pull request #14 from Mastercard/feature/supressing-warnings
Suppressing Sonar warnings
2 parents df5f4cc + f6326ba commit 104cde6

File tree

4 files changed

+5
-0
lines changed

4 files changed

+5
-0
lines changed

src/main/java/com/mastercard/developer/encryption/FieldLevelEncryptionParams.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ Key getSecretKey() throws EncryptionException {
9292
}
9393
}
9494

95+
@java.lang.SuppressWarnings("squid:S3329")
9596
IvParameterSpec getIvSpec() throws EncryptionException {
9697
try {
9798
if (ivParameterSpec != null) {

src/main/java/com/mastercard/developer/encryption/aes/AESCBC.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ private AESCBC() {
1717

1818
private static final String CYPHER = "AES/CBC/PKCS5Padding";
1919

20+
@java.lang.SuppressWarnings("squid:S3329")
2021
public static byte[] decrypt(Key secretKey, JweObject object) throws GeneralSecurityException {
2122
SecretKeySpec aesKey = new SecretKeySpec(secretKey.getEncoded(), 16, 16, "AES");
2223

src/main/java/com/mastercard/developer/interceptors/HttpExecuteEncryptionInterceptor.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ public void intercept(HttpRequest request) throws IOException {
6363
}
6464

6565
@Override
66+
@java.lang.SuppressWarnings("squid:S3011")
6667
public void interceptResponse(HttpResponse response) throws IOException {
6768
try {
6869
// Read response payload

src/main/java/com/mastercard/developer/interceptors/OkHttpEncryptionInterceptor.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ public Response intercept(Chain chain) throws IOException {
2424
return handleResponse(encryptedResponse);
2525
}
2626

27+
@java.lang.SuppressWarnings("squid:S1874")
2728
private Request handleRequest(Request request) throws IOException {
2829
try {
2930
// Check request actually has a payload
@@ -55,6 +56,7 @@ private Request handleRequest(Request request) throws IOException {
5556
}
5657
}
5758

59+
@java.lang.SuppressWarnings("squid:S1874")
5860
private Response handleResponse(Response response) throws IOException {
5961
try {
6062
// Check response actually has a payload

0 commit comments

Comments
 (0)