diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 00000000..26d33521 --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,3 @@ +# Default ignored files +/shelf/ +/workspace.xml diff --git a/.idea/compiler.xml b/.idea/compiler.xml new file mode 100644 index 00000000..19a9b8d1 --- /dev/null +++ b/.idea/compiler.xml @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/encodings.xml b/.idea/encodings.xml new file mode 100644 index 00000000..6e7e3720 --- /dev/null +++ b/.idea/encodings.xml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/.idea/jarRepositories.xml b/.idea/jarRepositories.xml new file mode 100644 index 00000000..712ab9d9 --- /dev/null +++ b/.idea/jarRepositories.xml @@ -0,0 +1,20 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 00000000..e24323ed --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,12 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 00000000..35eb1ddf --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/driver/src/main/java/oracle/nosql/driver/values/NullValue.java b/driver/src/main/java/oracle/nosql/driver/values/NullValue.java index 413bc592..66bbad45 100644 --- a/driver/src/main/java/oracle/nosql/driver/values/NullValue.java +++ b/driver/src/main/java/oracle/nosql/driver/values/NullValue.java @@ -34,15 +34,29 @@ public static NullValue getInstance() { return INSTANCE; } + private boolean isEmptyType(FieldValue value){ + return value instanceof EmptyValue || + value instanceof ArrayValue || + value instanceof BinaryValue || + value instanceof BooleanValue || + value instanceof IntegerValue || + value instanceof JsonNullValue || + value instanceof LongValue || + value instanceof MapValue; + } + @Override public int compareTo(FieldValue other) { if (other instanceof NullValue) { return 0; } - /* TODO: sort empty types? */ + if (isEmptyType(other)){ + return 0; + } return -1; } + @Override public String getString() { return toJson(null);