Skip to content

Commit

Permalink
Fixing spotless issues.
Browse files Browse the repository at this point in the history
  • Loading branch information
nmondal committed Jul 23, 2023
1 parent 4e13b5f commit 968fdbb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/org/mozilla/javascript/engine/Builtins.java
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public static void print(Context cx, Scriptable thisObj, Object[] args, Function
self.stdout.write(ScriptRuntime.toString(arg));
}
self.stdout.write('\n');
//ref bug https://github.com/mozilla/rhino/issues/1356
// ref bug https://github.com/mozilla/rhino/issues/1356
self.stdout.flush();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
import javax.script.ScriptEngineManager;
import javax.script.ScriptException;
import javax.script.SimpleScriptContext;

import org.junit.*;
import org.mozilla.javascript.engine.RhinoScriptEngineFactory;

Expand All @@ -35,13 +34,13 @@ public void setup() {
public void printStdout() throws Exception {
ByteArrayOutputStream bos = new ByteArrayOutputStream();
PrintStream original = System.out;
PrintStream modified = new PrintStream(bos,false);
PrintStream modified = new PrintStream(bos, false);
System.setOut(modified);
// Now Get A SimpleContext
ScriptContext sc = new SimpleScriptContext();
try {
// this was a broken test
engine.eval("print('Hello, World!');", sc );
engine.eval("print('Hello, World!');", sc);
// this has been hard work https://github.com/mozilla/rhino/issues/1356
Assert.assertEquals("Hello, World!\n", bos.toString());
} finally {
Expand Down

0 comments on commit 968fdbb

Please sign in to comment.