commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gary Gregory (JIRA)" <>
Subject [jira] [Commented] (TEXT-127) Detect when a variable is unknown in StringSubstitutor
Date Wed, 24 Oct 2018 22:01:00 GMT


Gary Gregory commented on TEXT-127:

The best path is to submit a PR on GitHub IMO. I would make sure the current behavior is not
broken, IOW, don't throw an exception unless I call an API to enable it. Don't forget unit
tests ;-)

> Detect when a variable is unknown in StringSubstitutor
> ------------------------------------------------------
>                 Key: TEXT-127
>                 URL:
>             Project: Commons Text
>          Issue Type: Improvement
>            Reporter: Jean-Baptiste REICH
>            Priority: Minor
> Currently, StringSubstitutor is not replacing a variable that is unknown. It would be
nice to define the behavior in this case and to allow raising an exception.
> A workaround is to define a custom StringLookup that raises an exception when the variable
is unknown but this prevent from using the default value feature from StringSubstitutor

This message was sent by Atlassian JIRA

View raw message