Skip to content

Commit

Permalink
Handle empty bundle symbolic name
Browse files Browse the repository at this point in the history
See #2678
  • Loading branch information
rosczja committed Jun 12, 2023
1 parent 8b4a647 commit bb26e65
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -838,7 +838,7 @@ protected void registerBundle(File file) {
return;
}
String name = manifest.getMainAttributes().getValue("Bundle-SymbolicName");
if (name != null) {
if (name != null && !name.isBlank()) {
int indexOf = name.indexOf(";");
if (indexOf > 0) {
name = name.substring(0, indexOf);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ protected void registerBundle(File file) {
return;
}
String name = manifest.getMainAttributes().getValue("Bundle-SymbolicName");
if (name != null) {
if (name != null && !name.isBlank()) {
int indexOf = name.indexOf(";");
if (indexOf > 0) {
name = name.substring(0, indexOf);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ protected T handle(IJarEntryResource jarEntry, TraversalState state) {
*/
private String getBundleSymbolicName(Manifest manifest) {
String name = manifest.getMainAttributes().getValue("Bundle-SymbolicName");
if (name != null) {
if (name != null && !name.isBlank()) {
final int indexOf = name.indexOf(';');
if (indexOf > 0)
name = name.substring(0, indexOf);
Expand Down

0 comments on commit bb26e65

Please sign in to comment.