Uploaded image for project: 'Calcite'
  1. Calcite
  2. CALCITE-1264

Litmus fail does not interpolate arguments

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.8.0
    • core
    • None

    Description

      Litmus#fail is currently implemented with String.format which does not accept a pair of curly brackets '{}' for formatting variables.
      For example,

      litmus.fail("msg is {}", "some error");
      => "msg is {}"

      I see 2 options:

      1. Change every call to fail that uses {}
      2. fail should use the sl4j MessageFormatter

      I'm going to open a PR with strategy 2. It's nice to keep the same message format as the logger, otherwise it's easy to introduce bugs there. There are currently only 2 places that use the "%s" format to call fail, so those can be easily changed.

      Attachments

        Activity

          People

            julianhyde Julian Hyde
            chris-baynes Chris Baynes
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: