From fa2a1042926cf456421e65b4aa3e3bcbd92075de Mon Sep 17 00:00:00 2001 From: Hashim Khan <64767361+hashim1999164@users.noreply.github.com> Date: 2026年8月13日 05:16:19 +0500 Subject: [PATCH] Docs: note ClassPath.getResources keeps one entry per path --- guava/src/com/google/common/reflect/ClassPath.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/guava/src/com/google/common/reflect/ClassPath.java b/guava/src/com/google/common/reflect/ClassPath.java index f57ed6a39875..592589e716da 100644 --- a/guava/src/com/google/common/reflect/ClassPath.java +++ b/guava/src/com/google/common/reflect/ClassPath.java @@ -139,8 +139,12 @@ public static ClassPath from(ClassLoader classloader) throws IOException { } /** - * Returns all resources loadable from the current class path, including the class files of all + * Returns resources loadable from the current class path, including the class files of all * loadable classes but excluding the "META-INF/MANIFEST.MF" file. + * + *
Note: {@link ResourceInfo} instances are equal when they share the same resource
+ * name and {@link ClassLoader}. Because this method returns an {@link ImmutableSet}, only one
+ * resource is kept for a given path even if that path appears in multiple jars or directories.
*/
public ImmutableSet