File tree Expand file tree Collapse file tree
dd-java-agent/agent-tooling/src/main/java/datadog/trace/agent/tooling/muzzle Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -116,19 +116,19 @@ private static boolean checkMatch(
116116 }
117117 return checkMatch (reference , resolution .resolve (), mismatches );
118118 } catch (final Exception e ) {
119- if (e .getMessage ().startsWith ("Cannot resolve type description for " )) {
119+ String message = e .getMessage ();
120+ if (message != null && message .startsWith ("Cannot resolve type description for " )) {
120121 // bytebuddy throws an illegal state exception with this message if it cannot resolve types
121122 // TODO: handle missing type resolutions without catching bytebuddy's exceptions
122- final String className = e . getMessage () .replace ("Cannot resolve type description for " , "" );
123+ final String className = message .replace ("Cannot resolve type description for " , "" );
123124 mismatches .add (new Mismatch .MissingClass (reference .sources , className ));
124- return false ;
125125 } else {
126126 // Shouldn't happen. Fail the reference check and add a mismatch for debug logging.
127127 mismatches .add (
128128 new Mismatch .ReferenceCheckError (
129129 e , reference , null != loader ? loader .toString () : "<bootstrap>" ));
130- return false ;
131130 }
131+ return false ;
132132 }
133133 }
134134
You can’t perform that action at this time.
0 commit comments