diff --git a/src/java/com/samskivert/util/HashIntMap.java b/src/java/com/samskivert/util/HashIntMap.java index 687ab130..4e0d11d7 100644 --- a/src/java/com/samskivert/util/HashIntMap.java +++ b/src/java/com/samskivert/util/HashIntMap.java @@ -343,8 +343,7 @@ public class HashIntMap extends AbstractMap // if we're not pointing to an entry, search for the next // non-empty hash chain if (_record == null) { - while ((_index-- > 0) && - ((_record = _buckets[_index]) == null)); + while ((_index-- > 0) && ((_record = _buckets[_index]) == null)) { /* loop! */ } } // keep track of the last thing we returned diff --git a/src/java/com/samskivert/util/QuickSort.java b/src/java/com/samskivert/util/QuickSort.java index cfde90ec..408a5b97 100644 --- a/src/java/com/samskivert/util/QuickSort.java +++ b/src/java/com/samskivert/util/QuickSort.java @@ -97,11 +97,11 @@ public class QuickSort for (;;) { // find the first element that is greater than or equal to the partition element // starting from the left index - while (comp.compare(a[++lo], mid) < 0); + while (comp.compare(a[++lo], mid) < 0) { /* loop! */ } // find an element that is smaller than or equal to the partition element starting from // the right index - while (comp.compare(mid, a[--hi]) < 0); + while (comp.compare(mid, a[--hi]) < 0) { /* loop! */ } // swap the two elements or bail out of the loop if (hi > lo) { @@ -161,11 +161,11 @@ public class QuickSort for (;;) { // find the first element that is greater than or equal to the partition element // starting from the left index - while (comp.compare(mid, a[++lo]) < 0); + while (comp.compare(mid, a[++lo]) < 0) { /* loop! */ } // find an element that is smaller than or equal to the partition element starting from // the right index - while (comp.compare(a[--hi], mid) < 0); + while (comp.compare(a[--hi], mid) < 0) { /* loop! */ } // swap the two elements or bail out of the loop if (hi > lo) { @@ -224,11 +224,11 @@ public class QuickSort for (;;) { // find the first element that is greater than or equal to the partition element // starting from the left Index. - while (mid.compareTo(a[++lo]) > 0); + while (mid.compareTo(a[++lo]) > 0) { /* loop! */ } // find an element that is smaller than or equal to the partition element starting from // the right Index. - while (mid.compareTo(a[--hi]) < 0); + while (mid.compareTo(a[--hi]) < 0) { /* loop! */ } // swap the two elements or bail out of the loop if (hi > lo) { @@ -287,11 +287,11 @@ public class QuickSort for (;;) { // find the first element that is greater than or equal to the partition element // starting from the left index - while (mid.compareTo(a[++lo]) < 0); + while (mid.compareTo(a[++lo]) < 0) { /* loop! */ } // find an element that is smaller than or equal to the partition element starting from // the right index - while (mid.compareTo(a[--hi]) > 0); + while (mid.compareTo(a[--hi]) > 0) { /* loop! */ } // swap the two elements or bail out of the loop if (hi > lo) {