Browse Source

whitespace

master
Stefan Bodewig 8 years ago
parent
commit
96dc65b2da
2 changed files with 12 additions and 12 deletions
  1. +11
    -11
      src/main/org/apache/tools/ant/util/ScriptRunnerBase.java
  2. +1
    -1
      src/tests/junit/org/apache/tools/ant/taskdefs/optional/RhinoScriptTest.java

+ 11
- 11
src/main/org/apache/tools/ant/util/ScriptRunnerBase.java View File

@@ -241,15 +241,15 @@ public abstract class ScriptRunnerBase {

final Charset charset;
if (null == encoding) {
charset = null;
charset = null;
} else {
charset = Charset.forName(encoding);
charset = Charset.forName(encoding);
}

try {
readSource(in, filename, charset);
} finally {
FileUtils.close(in);
FileUtils.close(in);
}
}

@@ -283,14 +283,14 @@ public abstract class ScriptRunnerBase {
* @throws BuildException if the resource cannot be read
*/
public void loadResource(Resource sourceResource) {
if (sourceResource instanceof StringResource) {
script += ((StringResource) sourceResource).getValue();
return;
}
if (sourceResource instanceof PropertyResource) {
script += ((PropertyResource) sourceResource).getValue();
return;
}
if (sourceResource instanceof StringResource) {
script += ((StringResource) sourceResource).getValue();
return;
}
if (sourceResource instanceof PropertyResource) {
script += ((PropertyResource) sourceResource).getValue();
return;
}

String name = sourceResource.toLongString();
InputStream in = null;


+ 1
- 1
src/tests/junit/org/apache/tools/ant/taskdefs/optional/RhinoScriptTest.java View File

@@ -35,7 +35,7 @@ public class RhinoScriptTest {

@Rule
public BuildFileRule buildRule = new BuildFileRule();
@Before
public void setUp() {
buildRule.configureProject("src/etc/testcases/taskdefs/optional/script.xml");


Loading…
Cancel
Save