summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsharath reddy <bs.reddy@huawei.com>2022-05-17 11:00:18 +0530
committersharath reddy <bs.reddy@huawei.com>2022-05-17 11:02:08 +0530
commita3d9cc0ea44b7ac13c5c56506aabcb5a43b8068f (patch)
tree5818809cc3ebd7e3238a377fc31ac0cd27c6981b
parentb47dea99d588b768e4254f983123cfdce2ffbd5c (diff)
1. Comment addition on explaining why this method is empty
2.Arguments swapping to maintain in correct order https://sonarcloud.io/project/issues?resolved=false&severities=CRITICAL&id=onap_vnfsdk-validation&open=AW6lcX93wQN7qqDOuZdl https://sonarcloud.io/project/issues?resolved=false&severities=MAJOR&id=onap_vnfsdk-validation&open=AXb86PeCWcGc8ovkTVG3 Issue-ID: VNFSDK-832 Signed-off-by: sharath reddy <bs.reddy@huawei.com> Change-Id: I142dda1ba74f1d2aff51cdfd81dac5d9580586ea Signed-off-by: sharath reddy <bs.reddy@huawei.com>
-rw-r--r--csarvalidation/src/main/java/org/onap/cvc/csar/cc/sol001/VTPValidateCSARR17852.java1
-rw-r--r--csarvalidation/src/main/java/org/onap/cvc/csar/cc/sol001/VTPValidateCSARR46527.java1
-rw-r--r--csarvalidation/src/test/java/org/onap/cvc/csar/security/SignatureFactoryTest.java8
3 files changed, 6 insertions, 4 deletions
diff --git a/csarvalidation/src/main/java/org/onap/cvc/csar/cc/sol001/VTPValidateCSARR17852.java b/csarvalidation/src/main/java/org/onap/cvc/csar/cc/sol001/VTPValidateCSARR17852.java
index 96181fd..6053d2e 100644
--- a/csarvalidation/src/main/java/org/onap/cvc/csar/cc/sol001/VTPValidateCSARR17852.java
+++ b/csarvalidation/src/main/java/org/onap/cvc/csar/cc/sol001/VTPValidateCSARR17852.java
@@ -25,6 +25,7 @@ public class VTPValidateCSARR17852 extends VTPValidateCSARBase {
@Override
protected void validateCSAR(CSARArchive csar) throws Exception {
+ //Implementing an abstract method
}
@Override
diff --git a/csarvalidation/src/main/java/org/onap/cvc/csar/cc/sol001/VTPValidateCSARR46527.java b/csarvalidation/src/main/java/org/onap/cvc/csar/cc/sol001/VTPValidateCSARR46527.java
index bc680a3..7900908 100644
--- a/csarvalidation/src/main/java/org/onap/cvc/csar/cc/sol001/VTPValidateCSARR46527.java
+++ b/csarvalidation/src/main/java/org/onap/cvc/csar/cc/sol001/VTPValidateCSARR46527.java
@@ -25,6 +25,7 @@ public class VTPValidateCSARR46527 extends VTPValidateCSARBase {
@Override
protected void validateCSAR(CSARArchive csar) throws Exception {
+ //Implementing an abstract method
}
@Override
diff --git a/csarvalidation/src/test/java/org/onap/cvc/csar/security/SignatureFactoryTest.java b/csarvalidation/src/test/java/org/onap/cvc/csar/security/SignatureFactoryTest.java
index baa88c0..7e017fa 100644
--- a/csarvalidation/src/test/java/org/onap/cvc/csar/security/SignatureFactoryTest.java
+++ b/csarvalidation/src/test/java/org/onap/cvc/csar/security/SignatureFactoryTest.java
@@ -134,7 +134,7 @@ public class SignatureFactoryTest {
@Test
public void shouldCreateContentInfoWithProperContentForDecodedPKCS7() throws IOException, CmsSignatureLoadingException {
// given
- InputStream signatureAsStream = loadFileFromResources("./security/signature/testEncodedSignature.sig.p7c");
+ InputStream signatureAsStream = loadFileFromResources();
// when
ContentInfo contentInfo = signatureFactory.createSignature(signatureAsStream.readAllBytes());
@@ -144,10 +144,10 @@ public class SignatureFactoryTest {
assertThat(testPkcs7Signature).contains(contentInfoSignature);
}
- private InputStream loadFileFromResources(String fileFromResources) throws IOException{
- InputStream resourceAsStream = SignatureFactoryTest.class.getClassLoader().getResourceAsStream(fileFromResources);
+ private InputStream loadFileFromResources() throws IOException{
+ InputStream resourceAsStream = SignatureFactoryTest.class.getClassLoader().getResourceAsStream("./security/signature/testEncodedSignature.sig.p7c");
if(resourceAsStream==null) {
- throw new IOException(String.format("fail to load file: %s from resourcer", fileFromResources));
+ throw new IOException(String.format("fail to load file: %s from resourcer", "./security/signature/testEncodedSignature.sig.p7c"));
}
return resourceAsStream;
}