Skip to content

Commit

Permalink
FELIX-6271 - Make sure invalid bundles are deleted in BundleServlet (#20
Browse files Browse the repository at this point in the history
)
  • Loading branch information
coheigea committed Apr 30, 2020
1 parent 4102a86 commit a990764
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1639,13 +1639,12 @@ private void installBundle( String location, File bundleFile, int startLevel, bo
{
// try to get the bundle name & version, fail if none
Map.Entry<String, String> snv = getSymbolicNameVersion( bundleFile );
String symbolicName = snv.getKey();
String version = snv.getValue();
if ( symbolicName == null )
{
if ( snv == null || snv.getKey() == null ) {
bundleFile.delete();
throw new IOException( Constants.BUNDLE_SYMBOLICNAME + " header missing, cannot install bundle" );
}
String symbolicName = snv.getKey();
String version = snv.getValue();

// check for existing bundle first
Bundle updateBundle = null;
Expand Down

0 comments on commit a990764

Please sign in to comment.