Author: tv Date: Sun Apr 21 13:30:19 2024 New Revision: 1917242 URL: http://svn.apache.org/viewvc?rev=1917242&view=rev Log: Use Charset where appropriate
Modified: db/torque/trunk/torque-ant-tasks/src/main/java/org/apache/torque/ant/task/TorqueGeneratorTask.java Modified: db/torque/trunk/torque-ant-tasks/src/main/java/org/apache/torque/ant/task/TorqueGeneratorTask.java URL: http://svn.apache.org/viewvc/db/torque/trunk/torque-ant-tasks/src/main/java/org/apache/torque/ant/task/TorqueGeneratorTask.java?rev=1917242&r1=1917241&r2=1917242&view=diff ============================================================================== --- db/torque/trunk/torque-ant-tasks/src/main/java/org/apache/torque/ant/task/TorqueGeneratorTask.java (original) +++ db/torque/trunk/torque-ant-tasks/src/main/java/org/apache/torque/ant/task/TorqueGeneratorTask.java Sun Apr 21 13:30:19 2024 @@ -20,6 +20,7 @@ package org.apache.torque.ant.task; */ import java.io.File; +import java.nio.charset.Charset; import java.util.ArrayList; import java.util.HashMap; import java.util.List; @@ -150,7 +151,7 @@ public class TorqueGeneratorTask extends * The encoding which should be used for the files which do not have an * output encoding set in the templates. */ - private String defaultOutputEncoding; + private Charset defaultOutputCharset; /** * Whether all source files should be combined into one source tree. @@ -343,7 +344,7 @@ public class TorqueGeneratorTask extends unitDescriptor.setLoglevel(convertedLoglevel); unitDescriptor.setRunOnlyOnSourceChange(runOnlyOnSourceChange); unitDescriptor.setAddDebuggingInfoToOutput(addDebuggingInfoToOutput); - unitDescriptor.setDefaultOutputEncoding(defaultOutputEncoding); + unitDescriptor.setDefaultOutputEncoding(defaultOutputCharset); log("unit descriptor created", Project.MSG_DEBUG); if (overrideConfigDir != null) { @@ -359,8 +360,7 @@ public class TorqueGeneratorTask extends parentUnitDescriptor.setOverrideSourceProvider(fileSourceProvider); parentUnitDescriptor.setOverrideOptions(optionConfiguration); parentUnitDescriptor.setLoglevel(convertedLoglevel); - parentUnitDescriptor.setDefaultOutputEncoding( - defaultOutputEncoding); + parentUnitDescriptor.setDefaultOutputEncoding(defaultOutputCharset); log("child unit descriptor created",Project.MSG_DEBUG); unitDescriptor = parentUnitDescriptor; } @@ -525,13 +525,13 @@ public class TorqueGeneratorTask extends * Sets the encoding which should be used for the files which do not have * an output encoding set in the templates. * - * @param defaultOutputEncoding the default output encoding, + * @param defaultOutputCharset the default output encoding, * or null to use the generator default * (the platform default encoding). */ - public void setDefaultOutputEncoding(final String defaultOutputEncoding) + public void setDefaultOutputEncoding(final Charset defaultOutputCharset) { - this.defaultOutputEncoding = defaultOutputEncoding; + this.defaultOutputCharset = defaultOutputCharset; } /** --------------------------------------------------------------------- To unsubscribe, e-mail: torque-dev-unsubscr...@db.apache.org For additional commands, e-mail: torque-dev-h...@db.apache.org