Details
-
Bug
-
Resolution: Fixed
-
Major
-
2.5.0, 2.1.0, 2.1.5, 2.1.2, 2.0.0, 2.0.2
-
Security Level: Public
-
None
Description
Following on from CBL-88, the idea for a quick workaround of just trying to stop the replicator anyway also fails as we hit a different NPE in checking the activity level (potentially the same root cause though - that the status is null)
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); |
try { |
r.getStatus();
|
} catch (NullPointerException e) { |
e.printStackTrace();// CBL-88 |
}
|
r.stop();
|
}
|
}
|