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

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.5.0, 2.1.0, 2.1.5, 2.1.2, 2.0.0, 2.0.2
    • Fix Version/s: 2.6.0
    • Component/s: Java-Android
    • Security Level: Public
    • Labels:
      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

          Hide
          daniel.petersen Daniel Petersen added a comment -

          James Flather, what version are you looking for?

          Show
          daniel.petersen Daniel Petersen added a comment - James Flather , what version are you looking for?
          Hide
          James Flather James Flather added a comment -

          Daniel Petersen The Affects Version should ideally list every affected version. In this case, that would be:
          2.0.0 2.0.2 2.1.0 2.1.2 2.1.5 2.5.0

          Show
          James Flather James Flather added a comment - Daniel Petersen The Affects Version should ideally list every affected version. In this case, that would be: 2.0.0 2.0.2 2.1.0 2.1.2 2.1.5 2.5.0
          Hide
          daniel.petersen Daniel Petersen added a comment -

          Should all be there now - I was missing 2.1.2.

          Show
          daniel.petersen Daniel Petersen added a comment - Should all be there now - I was missing 2.1.2.
          Hide
          James Flather James Flather added a comment -

          Awesome, thanks folks!

          Show
          James Flather James Flather added a comment - Awesome, thanks folks!
          Hide
          blake.meike Blake Meike added a comment -

          James confirms closed.

          Show
          blake.meike Blake Meike added a comment - James confirms closed.

            People

            • Assignee:
              James Flather James Flather
              Reporter:
              James Flather James Flather
            • 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

                  Error rendering 'com.pagerduty.jira-server-plugin:PagerDuty'. Please contact your Jira administrators.