Code Review
/
sdc.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Fixed a few static analysis violations
[sdc.git]
/
openecomp-be
/
lib
/
openecomp-sdc-enrichment-lib
/
openecomp-sdc-enrichment-impl
/
src
/
test
/
java
/
org
/
openecomp
/
sdc
/
enrichment
/
impl
/
external
/
artifact
/
MonitoringMibEnricherTest.java
diff --git
a/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-impl/src/test/java/org/openecomp/sdc/enrichment/impl/external/artifact/MonitoringMibEnricherTest.java
b/openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-impl/src/test/java/org/openecomp/sdc/enrichment/impl/external/artifact/MonitoringMibEnricherTest.java
index
38f7a1c
..
5f1a671
100644
(file)
--- a/
openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-impl/src/test/java/org/openecomp/sdc/enrichment/impl/external/artifact/MonitoringMibEnricherTest.java
+++ b/
openecomp-be/lib/openecomp-sdc-enrichment-lib/openecomp-sdc-enrichment-impl/src/test/java/org/openecomp/sdc/enrichment/impl/external/artifact/MonitoringMibEnricherTest.java
@@
-42,7
+42,6
@@
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;
import java.io.File;
import org.testng.annotations.Test;
import java.io.File;
-import java.io.InputStream;
import java.nio.ByteBuffer;
import java.util.ArrayList;
import java.util.Collection;
import java.nio.ByteBuffer;
import java.util.ArrayList;
import java.util.Collection;
@@
-159,8
+158,8
@@
public class MonitoringMibEnricherTest {
}
private ByteBuffer getMibByteBuffer(String fileName) {
}
private ByteBuffer getMibByteBuffer(String fileName) {
- InputStream mibFile = FileUtils.getFileInputStream(this.getClass().getResource(fileName));
-
byte[] mibBytes = FileUtils.toByteArray(mibFile
);
+ byte[] mibBytes = FileUtils.readViaInputStream(this.getClass().getResource(fileName),
+
stream -> FileUtils.toByteArray(stream)
);
return ByteBuffer.wrap(mibBytes);
}
return ByteBuffer.wrap(mibBytes);
}