Skip to content

Commit 5661b0a

Browse files
committed
Add log warning if entryKey has multiple prefixIds.
1 parent bde8272 commit 5661b0a

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

dd-java-agent/agent-bootstrap/src/main/java/datadog/trace/bootstrap/AgentJarIndex.java

+6
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,12 @@ public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) {
142142
if (null != prefixRoot) {
143143
String entryKey = computeEntryKey(prefixRoot.relativize(file));
144144
if (null != entryKey) {
145+
if (-1 != prefixTrie.apply(entryKey)) {
146+
log.warn(
147+
"entryKey '{}' has multiple prefixIds: overriding existing prefixId with '{}'.",
148+
entryKey,
149+
prefixId);
150+
}
145151
prefixTrie.put(entryKey, prefixId);
146152
if (entryKey.endsWith("*")) {
147153
// optimization: wildcard will match everything under here so can skip

0 commit comments

Comments
 (0)