@Override
    public boolean equals(@Nullable Object other) {
        if (this == other) {
            return true;
        }
        if (!(other instanceof ClassPathResource)) {
            return false;
        }
        ClassPathResource otherRes = (ClassPathResource) other;
        return (this.path.equals(otherRes.path) &&
            ObjectUtils.nullSafeEquals(this.classLoader, otherRes.classLoader) &&
            ObjectUtils.nullSafeEquals(this.clazz, otherRes.clazz));
    }
This implementation compares the underlying class path locations.
analyzer/src/main/java/nl/basjes/parse/useragent/utils/springframework/core/io/ClassPathResource.java