Uploaded image for project: 'Couchbase Java Client'
  1. Couchbase Java Client
  2. JCBC-1714

DOC - Migration Guide has Incorrect Example

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • None
    • None
    • Documentation
    • None
    • 1

    Description

      The following page https://docs.couchbase.com/java-sdk/current/project-docs/migrating-sdk-code-to-3.n.html has incorrect example for SDK 2.0  example

      I am not creating this in the DOC project as its related to sample code.

          Cluster cluster = Cluster.connect(connectionString, username, password);    Bucket bucket = cluster.bucket(bucketName);    GetResult getResult = bucket.defaultCollection().get("airline_10");    cluster.disconnect();
          // #end::migrating_sdk_code_to_3_n_11[];
        }  public void migrating_sdk_code_to_3_n_22() throws Exception { // file: project-docs/pages/migrating-sdk-code-to-3.n.adoc line: 492
          QueryResult queryResult = cluster.query("select 1=");
          if (!queryResult.metaData().warnings().isEmpty()) {
            // errors contain [{"msg":"syntax error - at end of input","code":3000}]
          }
          // #end::migrating_sdk_code_to_3_n_22[];
        }
        public static void main(String[] args) throws Exception {
          MigratingSDKCodeTo3n obj = new MigratingSDKCodeTo3n();
          obj.init();
          obj.migrating_sdk_code_to_3_n_1();
          obj.migrating_sdk_code_to_3_n_2();
          obj.migrating_sdk_code_to_3_n_11();
          obj.migrating_sdk_code_to_3_n_22();
        }
      }
      

       

       

      Attachments

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

        Activity

          People

            michael.reiche Michael Reiche
            arun.vijayraghavan Arun Vijayraghavan (Inactive)
            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