Skip to content

Commit

Permalink
Fix problem with empty code minings being shown
Browse files Browse the repository at this point in the history
- fix CodeMiningLineHeaderAnnotation to add check for mining label being empty
- fixes eclipse-platform#131
  • Loading branch information
jjohnstn authored and mickaelistria committed Jan 9, 2023
1 parent 2929fd0 commit 8c09461
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2017 Angelo ZERR.
* Copyright (c) 2017, 2022 Angelo ZERR.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
Expand Down Expand Up @@ -88,7 +88,7 @@ public int getHeight() {
* label and <code>false</code> otherwise.
*/
private boolean hasAtLeastOneResolvedMiningNotEmpty() {
if (fMinings.stream().anyMatch(m -> m.getLabel() != null)) {
if (fMinings.stream().anyMatch(m -> m.getLabel() != null && !m.getLabel().isEmpty())) {
return true; // will have a resolved mining.
}

Expand Down

0 comments on commit 8c09461

Please sign in to comment.