Uploaded image for project: 'Couchbase Lite'
  1. Couchbase Lite
  2. CBL-88

Calling Replicator#getStatus() on a replicator that hasn't started throws NPE

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 2.6.0
    • 2.5.0, 2.1.0, 2.1.5, 2.1.2, 2.0.0, 2.0.2
    • Java-Android
    • Security Level: Public
    • None

    Description

      (Apologies, not sure if we're using CBL for this kind of issue - please move as needed)

      Basic repro:

      public class MainActivity extends AppCompatActivity {
       
          Database db;
          Replicator r;
          URI u;
       
          @Override
          protected void onCreate (Bundle savedInstanceState) {
              super.onCreate(savedInstanceState);
              setContentView(R.layout.activity_main);
       
              DatabaseConfiguration dbc = new DatabaseConfiguration(this);
              try {
                  db = new Database("test", dbc);
              } catch (CouchbaseLiteException e) {
                  e.printStackTrace();
              }
       
              try {
                  u = new URI("ws://localhost");
              } catch (URISyntaxException e) {
                  e.printStackTrace();
              }
              ReplicatorConfiguration rpc = new ReplicatorConfiguration(db, new URLEndpoint(u));
       
              r = new Replicator(rpc);
              r.getStatus();
          }
      }
      

      Attachments

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

        Activity

          People

            James Flather James Flather (Inactive)
            James Flather James Flather (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty