Uploaded image for project: 'Java Couchbase JVM Core'
  1. Java Couchbase JVM Core
  2. JVMCBC-1179

LookupInResult.contentAs(i, Boolean.class) throws PathNotFound for `exists` spec

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Duplicate
    • Major
    • None
    • None
    • None
    • None
    • 0

    Description

      The following code throws PathNotFoundException. Expected result is printing "false".

      collection.upsert("foo", mapOf("magicWord", "xyzzy"));
      LookupInResult r = collection.lookupIn("foo", listOf(
        LookupInSpec.exists("non-existent-path"))
      );
      System.out.println(r.contentAs(0, Boolean.class));
      

      First, investigate whether SDK 3 or supported versions of Couchbase Server have ever behaved differently. If this is not a regression, then leave it unchanged so we don't break existing code, and make sure the docs recommend getting the result using LookupInResult.exists instead of contentAs.

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              david.nault David Nault
              david.nault David Nault
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes

                  PagerDuty