Skip to content

Commit

Permalink
Merge pull request #116 from lquenti/master
Browse files Browse the repository at this point in the history
Fixed bugs found by static code analyzer. And reported on github.
  • Loading branch information
maarzt authored Jul 22, 2024
2 parents 1e258a6 + e3001ca commit 6514509
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 @@ -280,6 +280,6 @@ static boolean transformationEquals(AffineTransform3D a, AffineTransform3D b) {
max_difference = Math.max(max_difference, Math.abs(va - vb));
}
}
return max_difference == 0.0 | max_difference < max_abs_value * 1e-6;
return max_difference == 0.0 || max_difference < max_abs_value * 1e-6;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ private AffineTransform3D getScaling(Interval inputImage,
private long[] get3dDimensions(Interval interval) {
long[] result = new long[3];
int n = interval.numDimensions();
for (int i = 0; i < n & i < 3; i++)
for (int i = 0; i < n && i < 3; i++)
result[i] = interval.dimension(i);
for (int i = n; i < 3; i++)
result[i] = 1;
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/sc/fiji/labkit/ui/panel/GuiUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public static JButton createActionIconButton(String name, final Action action,
{
JButton button = new JButton(action);
button.setText(name);
if (icon != "") {
if (icon.isEmpty()) {
button.setIcon(loadIcon(icon));
button.setIconTextGap(5);
button.setMargin(new Insets(button.getMargin().top, 3, button
Expand Down

0 comments on commit 6514509

Please sign in to comment.