Uploaded image for project: 'Jackrabbit Oak'
  1. Jackrabbit Oak
  2. OAK-10101

Improve exception message when retrieving String properties

    XMLWordPrintableJSON

Details

    • Task
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.48.0
    • 1.50.0
    • segment-tar
    • None

    Description

      If we have a property of type BINARIES and we try to read it, using the Oak API, as an array of STRING, then the exception message of the correctly raised IllegalStateException is:

      java.lang.IllegalStateException: String is too long: 2325884045577463478" (where the number is basically random) 

      In order to give a hint to the caller about what might go wrong, we should improve the exception message:

      throw new IllegalStateException("String is too long: " + length + "; possibly trying to read a BLOB using getString; can not convert BLOB to String");   

      Attachments

        Issue Links

          Activity

            People

              adulceanu Andrei Dulceanu
              adulceanu Andrei Dulceanu
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: