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; final Charset charset;
if (null == encoding) { if (null == encoding) {
charset = null;
charset = null;
} else { } else {
charset = Charset.forName(encoding);
charset = Charset.forName(encoding);
} }


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


@@ -283,14 +283,14 @@ public abstract class ScriptRunnerBase {
* @throws BuildException if the resource cannot be read * @throws BuildException if the resource cannot be read
*/ */
public void loadResource(Resource sourceResource) { 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(); String name = sourceResource.toLongString();
InputStream in = null; 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 @Rule
public BuildFileRule buildRule = new BuildFileRule(); public BuildFileRule buildRule = new BuildFileRule();
@Before @Before
public void setUp() { public void setUp() {
buildRule.configureProject("src/etc/testcases/taskdefs/optional/script.xml"); buildRule.configureProject("src/etc/testcases/taskdefs/optional/script.xml");


Loading…
Cancel
Save