Skip to content

Commit

Permalink
Fix ArrayIndexOutOfBounds exception
Browse files Browse the repository at this point in the history
Fixes a bug that was caused by a zero length array. Apparently it was me who introduced this bug earlier. Mea culpa.
  • Loading branch information
Richard Domander committed Jun 8, 2018
1 parent 298aa51 commit e9336b8
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ public SoftTissueAnalysis(final SelectSoftROI roi) {

// TODO Use a pre-existing method
private static double median(final double[] a) {
if (a.length < 0) {
if (a.length == 0) {
return 0.0;
}
if (a.length == 1) {
Expand Down

0 comments on commit e9336b8

Please sign in to comment.