Skip to content

Commit 91c913f

Browse files
committed
Only warn if prefixId changes.
1 parent 5661b0a commit 91c913f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

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

+2-1
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,8 @@ 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)) {
145+
int existingPrefixId = prefixTrie.apply(entryKey);
146+
if (-1 != existingPrefixId && prefixId != existingPrefixId) {
146147
log.warn(
147148
"entryKey '{}' has multiple prefixIds: overriding existing prefixId with '{}'.",
148149
entryKey,

0 commit comments

Comments
 (0)