public Artifact apply()

in src/main/java/org/apache/sling/feature/r2f/impl/Bundle2ArtifactMapper.java [62:89]


    public Artifact apply(Bundle bundle) {
        if (0 == bundle.getBundleId()) {
            // ignore the OSGi framework
            return null;
        }

        ArtifactId id = bvm.get(new AbstractMap.SimpleEntry<>(bundle.getSymbolicName(), bundle.getVersion()));
        if (id == null) {
            id = readGavFromPomProperties(bundle);
        }

        if (id == null) {
            // it must be a corner case exception...
            throw new IllegalStateException("Bundle "
                                            + bundle.getSymbolicName()
                                            + '-'
                                            + bundle.getVersion()
                                            + " not found in the 'idbsnver.properties' map nor it contains the META-INF/[groupId]/[artifactId]/pom.properties file");
        }

        Artifact artifact = new Artifact(id);

        BundleStartLevel bundleStartLevel = bundle.adapt(BundleStartLevel.class);
        int startOrder = bundleStartLevel.getStartLevel();
        artifact.setStartOrder(startOrder);

        return artifact;
    }