You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Chris Baynes (JIRA)" <ji...@apache.org> on 2016/05/31 08:15:12 UTC
[jira] [Commented] (CALCITE-1264) Litmus fail does not interpolate
arguments
[ https://issues.apache.org/jira/browse/CALCITE-1264?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15307413#comment-15307413 ]
Chris Baynes commented on CALCITE-1264:
---------------------------------------
Here's the PR: https://github.com/apache/calcite/pull/241
> 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)