You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@velocity.apache.org by "Henning Schmiedehausen (JIRA)" <de...@velocity.apache.org> on 2007/03/08 01:16:26 UTC

[jira] Closed: (VELOCITY-259) Can't see a reason why Velocity.mergeTemplate(String,Context,Writer) is deprecated

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

Henning Schmiedehausen closed VELOCITY-259.
-------------------------------------------


> Can't see a reason why Velocity.mergeTemplate(String,Context,Writer) is deprecated
> ----------------------------------------------------------------------------------
>
>                 Key: VELOCITY-259
>                 URL: https://issues.apache.org/jira/browse/VELOCITY-259
>             Project: Velocity
>          Issue Type: Improvement
>          Components: Documentation
>    Affects Versions: 1.3.1
>         Environment: Operating System: other
> Platform: Other
>            Reporter: Gernot Hüller
>            Priority: Minor
>             Fix For: 1.5
>
>
> The encoding of template files is well-defined, so I see no reason to deprecate 
> the method from above.
> There is a velocity property input.encoding which defines the encoding
> of templates
> "Character encoding for input (templates). Using this, you can use alternative 
> encoding for your templates, such as UTF-8."
> I feel that Velocity.mergeTemplate(String,Context,Writer) should simply use 
> that encoding.
> By deprecating the method and referencing to mergeTemplate
> (String,String,Context,Writer) you force a developer to duplicate the property.
> Suggestion:
> IF you decide to keep it deprecated, please extend the javadoc of the long 
> mergeTemplate method eg:
> "
> The default encoding that Velocity uses to read template files is defined in 
> the property input.encoding and defaults to ISO-8859-1.
> You can get the encoding that is currently configured in the Velocity runtime 
> using
> "RuntimeSingleton.getString
> (RuntimeConstants.INPUT_ENCODING,RuntimeConstants.ENCODING_DEFAULT)"
> And you can paste that code for the second parameter of mergeTemplate.
> "

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@velocity.apache.org
For additional commands, e-mail: dev-help@velocity.apache.org