SLING-12210 : Remove unused startLevel from BundleDescriptorImpl
diff --git a/src/main/java/org/apache/sling/feature/scanner/ContentPackageDescriptor.java b/src/main/java/org/apache/sling/feature/scanner/ContentPackageDescriptor.java
index 3157917..afa5554 100644
--- a/src/main/java/org/apache/sling/feature/scanner/ContentPackageDescriptor.java
+++ b/src/main/java/org/apache/sling/feature/scanner/ContentPackageDescriptor.java
@@ -19,7 +19,6 @@
 import java.util.List;
 import java.util.Properties;
 
-import org.apache.sling.feature.Artifact;
 import org.apache.sling.feature.Configuration;
 
 /**
diff --git a/src/main/java/org/apache/sling/feature/scanner/Scanner.java b/src/main/java/org/apache/sling/feature/scanner/Scanner.java
index 5b46880..a55f8bb 100644
--- a/src/main/java/org/apache/sling/feature/scanner/Scanner.java
+++ b/src/main/java/org/apache/sling/feature/scanner/Scanner.java
@@ -132,7 +132,7 @@
                 throw new IOException("Unable to find file for " + bundle.getId());
             }
 
-            desc = new BundleDescriptorImpl(bundle, file, startLevel);
+            desc = new BundleDescriptorImpl(bundle, file);
             this.cache.put(key, desc);
         }
         return desc;
@@ -243,7 +243,7 @@
                     if (headers != null) {
                         Manifest manifest = new Manifest();
                         headers.forEach(manifest.getMainAttributes()::putValue);
-                        BundleDescriptor desc = new BundleDescriptorImpl(bundle, artifactProvider, manifest, bundle.getStartOrder());
+                        BundleDescriptor desc = new BundleDescriptorImpl(bundle, artifactProvider, manifest);
                         this.cache.put(key, desc);
                     }
                 }
diff --git a/src/main/java/org/apache/sling/feature/scanner/impl/BundleDescriptorImpl.java b/src/main/java/org/apache/sling/feature/scanner/impl/BundleDescriptorImpl.java
index e69dffa..8bd4c06 100644
--- a/src/main/java/org/apache/sling/feature/scanner/impl/BundleDescriptorImpl.java
+++ b/src/main/java/org/apache/sling/feature/scanner/impl/BundleDescriptorImpl.java
@@ -64,9 +64,6 @@
     /** The bundle version. */
     private String bundleVersion;
 
-    /** The start level of this artifact. */
-    private final int startLevel;
-
     /** Manifest */
     private final Manifest manifest;
 
@@ -106,14 +103,12 @@
      * Constructor for a new descriptor
      * @param artifact The artifact
      * @param url The URL
-     * @param startLevel The start level
      * @throws IOException If the manifest can't be get
      * @throws NullPointerException If artifact is {@code null}
      */
     public BundleDescriptorImpl(final Artifact artifact,
-            final URL url,
-            final int startLevel) throws IOException  {
-        this(artifact, url, null, getManifest(url), startLevel);
+            final URL url) throws IOException  {
+        this(artifact, url, null, getManifest(url));
     }
 
     /**
@@ -121,15 +116,13 @@
      * @param artifact The artifact
      * @param provider The artifact provider
      * @param manifest The manifest
-     * @param startLevel The start level
      * @throws IOException If the manifest can't be get
      * @throws NullPointerException If artifact is {@code null}
      */
     public BundleDescriptorImpl(final Artifact artifact,
                                 final ArtifactProvider provider,
-                                final Manifest manifest,
-                                final int startLevel) throws IOException {
-        this(artifact, null, provider, manifest, startLevel);
+                                final Manifest manifest) throws IOException {
+        this(artifact, null, provider, manifest);
     }
 
     /**
@@ -138,18 +131,15 @@
      * @param url The URL
      * @param provider The artifact provider
      * @param manifest The manifest
-     * @param startLevel The start level
      * @throws IOException If the manifest can't be get
      * @throws NullPointerException If artifact is {@code null}
      */
     public BundleDescriptorImpl(final Artifact artifact,
                                 final URL url,
                                 final ArtifactProvider provider,
-                                final Manifest manifest,
-                                final int startLevel) throws IOException  {
+                                final Manifest manifest) throws IOException  {
         super(artifact.getId().toMvnId());
         this.artifact = artifact;
-        this.startLevel = startLevel;
         this.artifactFile = url;
         this.artifactProvider = provider;
         if ( manifest == null ) {
diff --git a/src/main/java/org/apache/sling/feature/scanner/impl/ContentPackageScanner.java b/src/main/java/org/apache/sling/feature/scanner/impl/ContentPackageScanner.java
index 045b53a..44383d2 100644
--- a/src/main/java/org/apache/sling/feature/scanner/impl/ContentPackageScanner.java
+++ b/src/main/java/org/apache/sling/feature/scanner/impl/ContentPackageScanner.java
@@ -214,8 +214,7 @@
 
                                 final Artifact bundle = new Artifact(extractArtifactId(packageArtifact.getId(), newFile));
                                 bundle.setStartOrder(startLevel);
-                                final BundleDescriptor info = new BundleDescriptorImpl(bundle, newFile.toURI().toURL(),
-                                        startLevel);
+                                final BundleDescriptor info = new BundleDescriptorImpl(bundle, newFile.toURI().toURL());
                                 bundle.getMetadata().put(ContentPackageDescriptorImpl.METADATA_PACKAGE,
                                         packageArtifact.getId().toMvnId());
                                 bundle.getMetadata().put(ContentPackageDescriptorImpl.METADATA_PATH, contentPath);
diff --git a/src/test/java/org/apache/sling/feature/analyser/task/impl/CheckBundleExportsImportsTest.java b/src/test/java/org/apache/sling/feature/analyser/task/impl/CheckBundleExportsImportsTest.java
index ad2e4a5..dc16885 100644
--- a/src/test/java/org/apache/sling/feature/analyser/task/impl/CheckBundleExportsImportsTest.java
+++ b/src/test/java/org/apache/sling/feature/analyser/task/impl/CheckBundleExportsImportsTest.java
@@ -159,7 +159,7 @@
 
     private void fdAddBundle(FeatureDescriptor fd, String id, String file) throws IOException {
         BundleDescriptor bd1 = new BundleDescriptorImpl(
-                new Artifact(ArtifactId.fromMvnId(id)), new File(resourceRoot, file).toURI().toURL(), 0);
+                new Artifact(ArtifactId.fromMvnId(id)), new File(resourceRoot, file).toURI().toURL());
         fd.getBundleDescriptors().add(bd1);
     }
 }
diff --git a/src/test/java/org/apache/sling/feature/analyser/task/impl/CheckBundleUnversionedPackagesTest.java b/src/test/java/org/apache/sling/feature/analyser/task/impl/CheckBundleUnversionedPackagesTest.java
index 3b80692..0757b6c 100644
--- a/src/test/java/org/apache/sling/feature/analyser/task/impl/CheckBundleUnversionedPackagesTest.java
+++ b/src/test/java/org/apache/sling/feature/analyser/task/impl/CheckBundleUnversionedPackagesTest.java
@@ -81,7 +81,7 @@
         Artifact artifact = new Artifact(ArtifactId.fromMvnId(id));
         artifact.setFeatureOrigins(origins);
         BundleDescriptor bd1 = new BundleDescriptorImpl(
-                artifact, new File(resourceRoot, file).toURI().toURL(), 0);
+                artifact, new File(resourceRoot, file).toURI().toURL());
         fd.getBundleDescriptors().add(bd1);
     }
 }
diff --git a/src/test/java/org/apache/sling/feature/analyser/task/impl/CheckRequirementsCapabilitiesTest.java b/src/test/java/org/apache/sling/feature/analyser/task/impl/CheckRequirementsCapabilitiesTest.java
index b08e095..2142c64 100644
--- a/src/test/java/org/apache/sling/feature/analyser/task/impl/CheckRequirementsCapabilitiesTest.java
+++ b/src/test/java/org/apache/sling/feature/analyser/task/impl/CheckRequirementsCapabilitiesTest.java
@@ -45,7 +45,7 @@
 
         BundleDescriptor bd1 = new BundleDescriptorImpl(
                 new Artifact(ArtifactId.fromMvnId("g:b1:1.2.0")),
-                f.toURI().toURL(), 7);
+                f.toURI().toURL());
 
         Feature feature = new Feature(ArtifactId.fromMvnId("a:b:1"));
 
@@ -80,7 +80,7 @@
 
         BundleDescriptor bd1 = new BundleDescriptorImpl(
                 new Artifact(ArtifactId.fromMvnId("g:b1:1.2.0")),
-                f.toURI().toURL(), 7);
+                f.toURI().toURL());
 
         Feature feature = new Feature(ArtifactId.fromMvnId("a:b:1"));
         FeatureDescriptor fd = new FeatureDescriptorImpl(feature);
diff --git a/src/test/java/org/apache/sling/feature/scanner/impl/BundleDescriptorImplTest.java b/src/test/java/org/apache/sling/feature/scanner/impl/BundleDescriptorImplTest.java
index b698942..cecd6ff 100644
--- a/src/test/java/org/apache/sling/feature/scanner/impl/BundleDescriptorImplTest.java
+++ b/src/test/java/org/apache/sling/feature/scanner/impl/BundleDescriptorImplTest.java
@@ -63,7 +63,7 @@
             + "Bundle-ManifestVersion: 2\n"
             + "Export-Package: org.apache.sling;version=1.0,org.apache.felix;version=2.0\n";
         URL f = new URL("jar:" + createBundle(bmf).toURI().toURL() + "!/");
-        BundleDescriptorImpl bdf = new BundleDescriptorImpl(new Artifact(new ArtifactId("foo", "bar", "1.0", "bla", "bundle")), f, 1);
+        BundleDescriptorImpl bdf = new BundleDescriptorImpl(new Artifact(new ArtifactId("foo", "bar", "1.0", "bla", "bundle")), f);
         final Set<PackageInfo> infos = bdf.getExportedPackages();
         assertEquals(2, infos.size());
         assertPackageInfo(infos ,"org.apache.sling", Version.parseVersion("1.0"));
@@ -94,7 +94,7 @@
         File dir = createBundleFolder(bmf);
         try {
             URL f = dir.toURI().toURL();
-            BundleDescriptorImpl bdf = new BundleDescriptorImpl(new Artifact(new ArtifactId("foo", "bar", "1.0", "bla", "bundle")), f, 1);
+            BundleDescriptorImpl bdf = new BundleDescriptorImpl(new Artifact(new ArtifactId("foo", "bar", "1.0", "bla", "bundle")), f);
             final Set<PackageInfo> infos = bdf.getExportedPackages();
             assertEquals(2, infos.size());
             assertPackageInfo(infos ,"org.apache.sling", Version.parseVersion("1.0"));