Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions spotbugs-exclude.xml
Original file line number Diff line number Diff line change
Expand Up @@ -132,9 +132,6 @@
<Match>
<Bug pattern="USBR_UNNECESSARY_STORE_BEFORE_RETURN" />
</Match>
<Match>
<Bug pattern="SPP_USE_ISEMPTY" />
</Match>
<Match>
<Bug pattern="BL_BURYING_LOGIC" />
</Match>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public LargeTreeNode(E data, LargeTreeNode<E> parentNode, Collection<LargeTreeNo
*/
@Override
public boolean isLeafNode() {
return (childNodes == null || childNodes.size() == 0);
return (childNodes == null || childNodes.isEmpty());
}

public Collection<LargeTreeNode<E>> getChildNodes() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ private QuickSelect() {
public static <T extends Comparable<T>> T select(List<T> list, int n) {
Objects.requireNonNull(list, "The list of elements must not be null.");

if (list.size() == 0) {
if (list.isEmpty()) {
String msg = "The list of elements must not be empty.";
throw new IllegalArgumentException(msg);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,13 @@ private static List<Integer> merge(List<Integer> arr) {
}

private static List<Integer> sort(List<Integer> unsortedA, List<Integer> unsortedB) {
if (unsortedA.size() <= 0 && unsortedB.size() <= 0) {
if (unsortedA.isEmpty() && unsortedB.isEmpty()) {
return new ArrayList<>();
}
if (unsortedA.size() <= 0) {
if (unsortedA.isEmpty()) {
return unsortedB;
}
if (unsortedB.size() <= 0) {
if (unsortedB.isEmpty()) {
return unsortedA;
}
if (unsortedA.get(0) <= unsortedB.get(0)) {
Expand Down