Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for CBL-1406 Java #16

Merged
merged 1 commit into from
Dec 16, 2020
Merged

Fix for CBL-1406 Java #16

merged 1 commit into from
Dec 16, 2020

Conversation

bmeike
Copy link
Contributor

@bmeike bmeike commented Dec 15, 2020

Fix for the Java side of the 2.8.0 bug.

I confirm that my tests were passing because the "real" root directory was still .../.couchbase. The code that fixes the (Android) problem, then, looks for the directory .../.couchbase/.couchbase. Since it will never find such a directory, I do not believe that the problem has gotten any worse.

Changes are as follows:

  • CouchbaseLiteInternal.java: DEFAULT_ROOT_DIR_NAME is empty: This is the main issue. Changing this effectively fixes the problem. Everything else is a consequence of changing this.

  • CouchbaseLiteInternal.java: verifyDir: "".exists() always returns false. Have to get the canonical file before checking for existence.

  • DatabaseTest.java: testReOpenExistingDb: verify that the default database path no longer ends with ".couchbase"

  • BaseTest.java: tearDownBaseTestClass: One of the main reasons for adding the .couchbase namespace was so that it was possible to clean up after running automated tests. Since they now run in the current directory, there's now way to do that safely, anymore.

@bmeike bmeike merged commit 8d0ae04 into java/release/hydrogen Dec 16, 2020
@bmeike bmeike deleted the hotfix/CBL-1406 branch December 16, 2020 00:27
bmeike added a commit that referenced this pull request Jan 15, 2021
* Fix for CBL-1406 Java (#16)
* CBL 1441: don't abort on unrecognized replicator state
* Fix CBL-1537: Replicator.start should not be deprecated
* Fix CBL-1440: FLSliceResult leaks memory
* Fix CBL-1051: synchronization in finalizer
* Fix CBL-1491, CBL-1495, CBL-1527: Replicator hangs
* CBL-370: make ReplicatorType visible from Kotlin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants