Skip to content

Commit 6ab325e

Browse files
authored
Avoid throwing exception for invalid modifiers (#10458)
OpenJ9 is behaving weirdly for access modifiers
1 parent a402472 commit 6ab325e

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

dd-java-agent/agent-debugger/src/main/java/com/datadog/debugger/symbol/SymbolExtractor.java

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ private static Collection<String> extractClassModifiers(int access) {
195195
results.add("deprecated");
196196
break;
197197
default:
198-
throw new IllegalArgumentException("Invalid access modifiers: " + bit);
198+
LOGGER.debug("Invalid class access modifiers: {}", bit);
199199
}
200200
}
201201
return results;
@@ -250,8 +250,11 @@ private static Collection<String> extractMethodModifiers(
250250
results.add("deprecated");
251251
break;
252252
default:
253-
throw new IllegalArgumentException(
254-
"Invalid access modifiers method[" + methodNode.name + methodNode.desc + "]: " + bit);
253+
LOGGER.debug(
254+
"Invalid access modifiers method[{}::{}]: {}",
255+
classNode.name,
256+
methodNode.name + methodNode.desc,
257+
bit);
255258
}
256259
}
257260
// if class is an interface && method has code && non-static this is a default method
@@ -302,7 +305,7 @@ private static Collection<String> extractFieldModifiers(int access) {
302305
results.add("deprecated");
303306
break;
304307
default:
305-
throw new IllegalArgumentException("Invalid access modifiers: " + bit);
308+
LOGGER.debug("Invalid access modifiers: {}", bit);
306309
}
307310
}
308311
return results;

0 commit comments

Comments
 (0)