You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Julian Hyde (JIRA)" <ji...@apache.org> on 2016/05/31 17:48:12 UTC

[jira] [Resolved] (CALCITE-1264) Litmus fail does not interpolate arguments

     [ https://issues.apache.org/jira/browse/CALCITE-1264?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Julian Hyde resolved CALCITE-1264.
----------------------------------
    Resolution: Fixed

Fixed in http://git-wip-us.apache.org/repos/asf/calcite/commit/2f937c1b. [~chris-baynes], Thanks for the PR!

> Litmus fail does not interpolate arguments
> ------------------------------------------
>
>                 Key: CALCITE-1264
>                 URL: https://issues.apache.org/jira/browse/CALCITE-1264
>             Project: Calcite
>          Issue Type: Bug
>          Components: core
>            Reporter: Chris Baynes
>            Assignee: Julian Hyde
>             Fix For: 1.8.0
>
>
> 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.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)