String getBundleInfo()

in src/main/java/org/apache/sling/commons/log/logback/internal/stacktrace/PackageInfoCollector.java [79:92]


    String getBundleInfo(@Nullable String className) {
        if (className == null) {
            return null;
        }
        String packageName = getPackageName(className);
        Set<String> infos = pkgInfoMapping.get(packageName);

        // If multiple infos are found then we cannot determine the exact version
        // so better not to provide any info
        if (infos == null || infos.size() > 1 || infos.isEmpty()) {
            return null;
        }
        return infos.stream().findFirst().orElse(null);
    }