Details
-
Bug
-
Resolution: Fixed
-
Major
-
None
-
None
-
None
-
1
Description
Suggested release note text:
Executing a Full-Text Search query with an open-ended date range facet no longer results in a NullPointerException.
The SearchDateRange constructor assumes the start and end arguments are non-null, but that's not true for open-ended ranges like:
// everything on or after someInstant
|
DateRange.create("myCoolRange", someInstant, null);
|
And as a result,
Caused by: java.lang.NullPointerException: text at java.util.Objects.requireNonNull(Objects.java:228) at java.time.format.DateTimeFormatter.parse(DateTimeFormatter.java:1848) at java.time.Instant.parse(Instant.java:395) at com.couchbase.client.java.search.result.SearchDateRange.<init>(SearchDateRange.java:51) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:423) at com.couchbase.client.core.deps.com.fasterxml.jackson.databind.introspect.AnnotatedConstructor.call(AnnotatedConstructor.java:128) at com.couchbase.client.core.deps.com.fasterxml.jackson.databind.deser.std.StdValueInstantiator.createFromObjectWith(StdValueInstantiator.java:291)
|