Skip to content

Commit b36cd05

Browse files
authored
Merge branch 'master' into jb/ddprof_1.22.0
2 parents a8476d6 + 99139bb commit b36cd05

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+
int existingPrefixId = prefixTrie.apply(entryKey);
146+
if (-1 != existingPrefixId && prefixId != existingPrefixId) {
147+
log.warn(
148+
"Detected duplicate content under '{}'. Ensure your content is under a distinct directory.",
149+
entryKey);
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)