[izpack-devel] VariableSubstitutor - parameters should be able to support a dash (-)
Jeff Gordon
jeff.not24 at gmail.com
Mon Feb 4 03:56:20 CET 2008
No objections here.
On Sun, Feb 3, 2008 at 3:03 PM, Piotr Skowronek <piotr at skowro.net> wrote:
> Hi All,
>
> Recently I have added additional parameter for VariableSubstitutor,
> that allows ANT-like (@param@) parameters parsing.
>
> Currently, variable names can contain following characters (if
> not using braces): letters, digits, underscore (_), dot.
> I would like to add a dash to the list of allowed parameters,
> as people seem to like use dashes especially in ANT scripts.
> Example: @my-parameter-to-be-substituted at .
>
> Do you have any objections?
> Patch in the attachment.
>
> Regards,
> Piotr
>
> Index: src/lib/com/izforge/izpack/util/VariableSubstitutor.java
> ===================================================================
> --- src/lib/com/izforge/izpack/util/VariableSubstitutor.java (revision
> 2031)
> +++ src/lib/com/izforge/izpack/util/VariableSubstitutor.java (working
> copy)
> @@ -341,7 +341,7 @@
> StringBuffer nameBuffer = new StringBuffer();
> while (c != -1 && (braces && c != '}') || (c >= 'a' && c <=
> 'z')
> || (c >= 'A' && c <= 'Z') || (braces && (c == '[') ||
> (c == ']'))
> - || (((c >= '0' && c <= '9') || c == '_' || c == '.')
> && nameBuffer.length() > 0))
> + || (((c >= '0' && c <= '9') || c == '_' || c == '.'
> || c == "-") && nameBuffer.length() > 0))
> {
> nameBuffer.append((char) c);
> c = reader.read();
>
> _______________________________________________
> izpack-devel mailing list
> izpack-devel at lists.berlios.de
> https://lists.berlios.de/mailman/listinfo/izpack-devel
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://lists.berlios.de/pipermail/izpack-devel/attachments/20080203/483cc571/attachment.html
More information about the izpack-devel
mailing list