Thanks for the patch. Turbine's services have actually been decoupled
from the Turbine core and are now available separately, in the
jarkarta-turbine-fulcrum CVS module. The coupled versions of the
services have been deprecated, and will no longer be maintained.
Bartek Walter <[EMAIL PROTECTED]> writes:
> These are two minor patches for Turbine 2.2:
>
> - in o.a.t.services.velocity.TurbineVelocityService.java: creation of
> VelocityContext beside RunData caused charset to be set to 8859_1 by
> default; now it is taken from TurbineResources; I found it useful for
> creating velocity-based emails from scheduled jobs.
>
> - in o.a.t.util.upload.FileItem.java: when saving a large file to target
> directory File.renameTo() was used; it failed if the temporary storage
> directory was on different volume that the target directory; now after
> the failure a raw copy is attempted.
>
> Can anyone check it in, please (if you consider it useful...;-)
>
> Regards,
> Bartek
>
> Index: TurbineVelocityService.java
> ===================================================================
> RCS file:
>
>/home/cvspublic/jakarta-turbine-2/src/java/org/apache/turbine/services/velocity/TurbineVelocityService.java,v
> retrieving revision 1.5
> diff -r1.5 TurbineVelocityService.java
> 89a90,91
> > import org.apache.turbine.services.resources.TurbineResources;
>>
> 414c416,417
> < charset = DEFAULT_CHAR_SET;
> ---
> > charset =
>TurbineResources.getString("locale.default.charset",DEFAULT_CHAR_SET);
>> // charset = DEFAULT_CHAR_SET;
> 419c422,423
> < charset = DEFAULT_CHAR_SET;
> ---
> > charset = TurbineResources.getString("locale.default.charset",
>DEFAULT_CHAR_SET);
>> // charset = DEFAULT_CHAR_SET;
> 441c445,446
> < encoding = null;
> ---
> > encoding =
>TurbineResources.getString("services.VelocityService.output.encoding", null);
>> // encoding = null;
>
> Index: FileItem.java
> ===================================================================
> RCS file:
>
>/home/cvspublic/jakarta-turbine-2/src/java/org/apache/turbine/util/upload/FileItem.java,v
> retrieving revision 1.3
> diff -r1.3 FileItem.java
> 430a431
> > File destFile = new File(file);
> 433,434c434,441
> < throw new Exception(
> < "Cannot write uploaded file to disk!");
> ---
> > FileWriter writer = null;
>> try {
>> writer = new FileWriter(file);
>> writer.write(getString());
>> } finally {
>> if (writer != null)
>> writer.close();
>> }
>
>
>
> --
> To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>