Uploaded image for project: 'Sqoop (Retired)'
  1. Sqoop (Retired)
  2. SQOOP-1786

Sqoop2: Stop using JSONValue.parse method call

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.99.4
    • 1.99.5
    • None
    • None

    Description

      While investigating SQOOP-1784, I've noticed that JSONValue.parse() method that we're using everywhere in the code base is swallowing exceptions and returning null on all failure scenarios.

      As this is causing a random NullPointerException being thrown elsewhere without proper information what went wrong, I would like to migrate to method JSONValue.parseWithException() instead. Given how much we're parsing JSONs inside Sqoop 2, I would also recommend to create a small Util class that will handle error cases and coverts the ParserException to SqoopException.

      Attachments

        1. SQOOP-1786.patch
          39 kB
          Jarek Jarcec Cecho

        Activity

          People

            jarcec Jarek Jarcec Cecho
            jarcec Jarek Jarcec Cecho
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: