Skip to content

Commit 17c2c82

Browse files
committed
cleanup
1 parent f331424 commit 17c2c82

File tree

1 file changed

+3
-2
lines changed
  • utils/src/main/java/datadog/instrument/utils

1 file changed

+3
-2
lines changed

utils/src/main/java/datadog/instrument/utils/Glue.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
import java.io.InputStream;
1313
import java.util.List;
1414
import java.util.MissingResourceException;
15+
import java.util.Objects;
1516

1617
/** Methods for packing glue bytecode into strings that can be stored in the constant pool. */
1718
public final class Glue {
@@ -85,10 +86,10 @@ public static byte[] unpackBytecode(String bytecode) {
8586
* @return the glue bytecode
8687
* @throws MissingResourceException if the bytecode cannot be read
8788
*/
88-
@SuppressWarnings({"Since15", "DataFlowIssue"})
89+
@SuppressWarnings({"Since15"})
8990
public static byte[] loadBytecode(Class<?> host, String glueName) {
9091
String glueResource = GLUE_RESOURCE_PREFIX + glueName;
91-
try (InputStream is = host.getResourceAsStream(glueResource)) {
92+
try (InputStream is = Objects.requireNonNull(host.getResourceAsStream(glueResource))) {
9293
if (JVM.atLeastJava(9)) {
9394
return is.readAllBytes();
9495
} else {

0 commit comments

Comments
 (0)