diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/script/ScriptDef.java b/src/main/org/apache/tools/ant/taskdefs/optional/script/ScriptDef.java index e45668c14..9f3854fe0 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/script/ScriptDef.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/script/ScriptDef.java @@ -194,7 +194,7 @@ public class ScriptDef extends DefBase { if (helper.getSrc() == null && helper.getEncoding() != null) { throw new BuildException("scriptdef requires a src attribute " - + "if the encoding is set"); + + "if the encoding is set"); } // Check if need to set the loader @@ -372,7 +372,7 @@ public class ScriptDef extends DefBase { } /** - * Defines the compilation feature (optional). + * Defines the compilation feature ; optional. * * @param compiled enables the script compilation if available. */ diff --git a/src/main/org/apache/tools/ant/util/ScriptRunnerBase.java b/src/main/org/apache/tools/ant/util/ScriptRunnerBase.java index ae0af33e9..c73899967 100644 --- a/src/main/org/apache/tools/ant/util/ScriptRunnerBase.java +++ b/src/main/org/apache/tools/ant/util/ScriptRunnerBase.java @@ -283,11 +283,11 @@ public abstract class ScriptRunnerBase { * @throws BuildException if the resource cannot be read */ public void loadResource(Resource sourceResource) { - if(sourceResource instanceof StringResource) { + if (sourceResource instanceof StringResource) { script += ((StringResource) sourceResource).getValue(); return; } - if(sourceResource instanceof PropertyResource) { + if (sourceResource instanceof PropertyResource) { script += ((PropertyResource) sourceResource).getValue(); return; } diff --git a/src/main/org/apache/tools/ant/util/ScriptRunnerHelper.java b/src/main/org/apache/tools/ant/util/ScriptRunnerHelper.java index 528a565ad..eda042114 100644 --- a/src/main/org/apache/tools/ant/util/ScriptRunnerHelper.java +++ b/src/main/org/apache/tools/ant/util/ScriptRunnerHelper.java @@ -183,7 +183,7 @@ public class ScriptRunnerHelper { * If this is true and the compilation feature is available in * the script engine, the script is compiled before the first * evaluation, and should be cached for future evaluations. - * Otherwise, a script is evaluated is used. + * Otherwise, the script is evaluated each time. * The default is false. * * @param compiled the value to set.