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

Litmus fail does not interpolate arguments

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.8.0
    • Component/s: core
    • Labels:
      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

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

              Dates

              • Created:
                Updated:
                Resolved: