Merge pull request #1145 from shellhub/dev

update AnyBaseToDecimal and optimization
This commit is contained in:
Yang Libin
2019-10-28 14:08:08 +08:00
committed by GitHub
3 changed files with 30 additions and 38 deletions

View File

@ -134,7 +134,7 @@ public class SinglyLinkedList {
* @throws IndexOutOfBoundsException if {@code position} not in range {@code low} to {@code high}
*/
public void checkBounds(int position, int low, int high) {
if (position < low || position > high) {
if (position > high || position < low) {
throw new IndexOutOfBoundsException(position + "");
}
}