提交 f38c67da authored 作者: noelgrandin's avatar noelgrandin

remove unused parameter "bNull" in method SortOrder#compareNull

上级 8e3b6f15
...@@ -242,7 +242,7 @@ public abstract class BaseIndex extends SchemaObjectBase implements Index { ...@@ -242,7 +242,7 @@ public abstract class BaseIndex extends SchemaObjectBase implements Index {
} }
boolean aNull = a == null, bNull = b == null; boolean aNull = a == null, bNull = b == null;
if (aNull || bNull) { if (aNull || bNull) {
return SortOrder.compareNull(aNull, bNull, sortType); return SortOrder.compareNull(aNull, sortType);
} }
int comp = table.compareTypeSave(a, b); int comp = table.compareTypeSave(a, b);
if ((sortType & SortOrder.DESCENDING) != 0) { if ((sortType & SortOrder.DESCENDING) != 0) {
......
...@@ -101,12 +101,11 @@ public class SortOrder implements Comparator<Value[]> { ...@@ -101,12 +101,11 @@ public class SortOrder implements Comparator<Value[]> {
* Compare two expressions where one of them is NULL. * Compare two expressions where one of them is NULL.
* *
* @param aNull whether the first expression is null * @param aNull whether the first expression is null
* @param bNull whether the second expression is null
* @param sortType the sort bit mask to use * @param sortType the sort bit mask to use
* @return the result of the comparison (-1 meaning the first expression * @return the result of the comparison (-1 meaning the first expression
* should appear before the second, 0 if they are equal) * should appear before the second, 0 if they are equal)
*/ */
public static int compareNull(boolean aNull, boolean bNull, int sortType) { public static int compareNull(boolean aNull, int sortType) {
if ((sortType & NULLS_FIRST) != 0) { if ((sortType & NULLS_FIRST) != 0) {
return aNull ? -1 : 1; return aNull ? -1 : 1;
} else if ((sortType & NULLS_LAST) != 0) { } else if ((sortType & NULLS_LAST) != 0) {
...@@ -136,7 +135,7 @@ public class SortOrder implements Comparator<Value[]> { ...@@ -136,7 +135,7 @@ public class SortOrder implements Comparator<Value[]> {
if (aNull == bNull) { if (aNull == bNull) {
continue; continue;
} }
return compareNull(aNull, bNull, type); return compareNull(aNull, type);
} }
int comp = database.compare(ao, bo); int comp = database.compare(ao, bo);
if (comp != 0) { if (comp != 0) {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论