Skip to content

Commit

Permalink
fix warning "Duplicate branches in 'switch'"
Browse files Browse the repository at this point in the history
  • Loading branch information
asolntsev committed Nov 2, 2024
1 parent 15c09dc commit d1daf52
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ public void setStroke(Stroke s) {
case BasicStroke.CAP_BUTT -> SWT.CAP_FLAT;
case BasicStroke.CAP_ROUND -> SWT.CAP_ROUND;
case BasicStroke.CAP_SQUARE -> SWT.CAP_SQUARE;
default -> SWT.CAP_SQUARE;
default -> throw new IllegalArgumentException("Unsupported CAP value: " + bs.getEndCap());
};
_gc.setLineCap(gcCap);

Expand All @@ -308,7 +308,7 @@ public void setStroke(Stroke s) {
case BasicStroke.JOIN_BEVEL -> SWT.JOIN_BEVEL;
case BasicStroke.JOIN_MITER -> SWT.JOIN_MITER;
case BasicStroke.JOIN_ROUND -> SWT.JOIN_ROUND;
default -> SWT.JOIN_MITER;
default -> throw new IllegalArgumentException("Unsupported line join: " + bs.getLineJoin());
};
_gc.setLineJoin(gcJoin);

Expand Down

0 comments on commit d1daf52

Please sign in to comment.