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

HELIUM: toJSON should throw unchecked exception

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Critical
    • 3.1.7
    • 2.8.0
    • Java, Java-Android
    • Security Level: Public
    • None
    • 2

    Description

      The toJSON methods in Array, Dictionary, Result and Document should all throw an unchecked exception if they fail because some string cannot be translated from UTF-8 (Fleece) encoding, to UTF-16 (Java String encoding)

      The exception is unchecked in the 3.1 branch ONLY. This avoids changing the API.

      Currently all except Document are annotated as @NonNull, when, in fact, they can return null. Document is annotated as @Nullable and should stay that way. All the others should be annotated @NonNull (not a breaking change) but changed to throw an IllegalStateException

      Attachments

        Issue Links

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

          Activity

            People

              blake.meike Blake Meike
              blake.meike Blake Meike
              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