Uploaded image for project: 'Apache Drill'
  1. Apache Drill
  2. DRILL-8302

tidy up some char conversions

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.21.0
    • None
    • None

    Description

      As part of DRILL-8301, I spotted code that could be tidied up. The aim of this issue is to reduce the size of DRILL-8301 without introducing changes to the char encodings.

      • uses of a pattern like `new String("aaaa")` - IntelliJ and other tools highlight this as unnecessary
      • uses of `new String(bytes, StandardCharsets.UTF_8.name())` - better to use `new String(bytes, StandardCharsets.UTF_8)`
      • use Base64 encodeToString instead of case where we encode to bytes and then do our own encoding of those bytes to a String
      • Change existing code with `Charset.forName("UTF-8")` to use `StandardCharsets.UTF_8`

      Attachments

        Issue Links

          Activity

            People

              fanningpj PJ Fanning
              pj.fanning PJ Fanning
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: