From 2fbe052b90ab89a274e4984f1bd81f6aa4d2f5a1 Mon Sep 17 00:00:00 2001 From: "igor%mir2.org" Date: Tue, 17 Dec 2002 20:48:35 +0000 Subject: [PATCH] Cosmetics: removal of junk white-space at line end --- js/rhino/examples/Control.java | 6 ++-- js/rhino/examples/Counter.java | 10 +++--- js/rhino/examples/DynamicScopes.java | 36 +++++++++---------- js/rhino/examples/File.java | 4 +-- js/rhino/examples/Foo.java | 2 +- js/rhino/examples/Matrix.java | 4 +-- js/rhino/examples/PrimitiveWrapFactory.java | 8 ++--- js/rhino/examples/Shell.java | 2 +- .../javascript/DefaultErrorReporter.java | 2 +- .../mozilla/javascript/NativeFunction.java | 6 ++-- .../javascript/debug/DebuggableObject.java | 2 +- .../tools/debugger/VariableModel.java | 2 +- 12 files changed, 42 insertions(+), 42 deletions(-) diff --git a/js/rhino/examples/Control.java b/js/rhino/examples/Control.java index b378e5e49c6..aecb35115be 100644 --- a/js/rhino/examples/Control.java +++ b/js/rhino/examples/Control.java @@ -18,7 +18,7 @@ * Copyright (C) 1997-1999 Netscape Communications Corporation. All * Rights Reserved. * - * Contributor(s): + * Contributor(s): * * Alternatively, the contents of this file may be used under the * terms of the GNU Public License (the "GPL"), in which case the @@ -38,7 +38,7 @@ import org.mozilla.javascript.*; * Example of controlling the JavaScript execution engine. * * We evaluate a script and then manipulate the result. - * + * */ public class Control { @@ -96,7 +96,7 @@ public class Control { System.out.println(fn.call(cx, scope, obj, new Object[0])); } catch (JavaScriptException e) { // ignore - } + } cx.exit(); } diff --git a/js/rhino/examples/Counter.java b/js/rhino/examples/Counter.java index d55f75edbf4..e1151bb218f 100644 --- a/js/rhino/examples/Counter.java +++ b/js/rhino/examples/Counter.java @@ -18,7 +18,7 @@ * Copyright (C) 1999 Netscape Communications Corporation. All * Rights Reserved. * - * Contributor(s): + * Contributor(s): * Norris Boyd * * Alternatively, the contents of this file may be used under the @@ -39,17 +39,17 @@ public class Counter extends ScriptableObject { // The zero-argument constructor used by Rhino runtime to create instances public Counter() { } - // Method jsConstructor defines the JavaScript constructor + // Method jsConstructor defines the JavaScript constructor public void jsConstructor(int a) { count = a; } // The class name is defined by the getClassName method public String getClassName() { return "Counter"; } - // The method jsGet_count defines the count property. + // The method jsGet_count defines the count property. public int jsGet_count() { return count++; } - // Methods can be defined using the jsFunction_ prefix. Here we define - // resetCount for JavaScript. + // Methods can be defined using the jsFunction_ prefix. Here we define + // resetCount for JavaScript. public void jsFunction_resetCount() { count = 0; } private int count; diff --git a/js/rhino/examples/DynamicScopes.java b/js/rhino/examples/DynamicScopes.java index 6b1947b4a90..4a5ec4e3471 100644 --- a/js/rhino/examples/DynamicScopes.java +++ b/js/rhino/examples/DynamicScopes.java @@ -18,7 +18,7 @@ * Copyright (C) 1997-2000 Netscape Communications Corporation. All * Rights Reserved. * - * Contributor(s): + * Contributor(s): * Norris Boyd * * Alternatively, the contents of this file may be used under the @@ -44,9 +44,9 @@ public class DynamicScopes { * Main entry point. * * Set up the shared scope and then spawn new threads that execute - * relative to that shared scope. Try compiling functions with and + * relative to that shared scope. Try compiling functions with and * without dynamic scope to see the effect. - * + * * The expected output is *
      * sharedScope
@@ -59,7 +59,7 @@ public class DynamicScopes {
      * The final three lines may be permuted in any order depending on
      * thread scheduling.
      */
-    public static void main(String[] args) 
+    public static void main(String[] args)
         throws JavaScriptException
     {
         Context cx = Context.enter();
@@ -72,8 +72,8 @@ public class DynamicScopes {
             cx.exit();
         }
     }
-    
-    static void runScripts(Context cx) 
+
+    static void runScripts(Context cx)
         throws JavaScriptException
     {
         // Initialize the standard objects (Object, Function, etc.)
@@ -87,7 +87,7 @@ public class DynamicScopes {
                         "function f() { return x; }";
         cx.evaluateString(scope, source, "MySource", 1, null);
 
-        // Now we spawn some threads that execute a script that calls the 
+        // Now we spawn some threads that execute a script that calls the
         // function 'f'. The scope chain looks like this:
         // 
         //            ------------------
@@ -105,7 +105,7 @@ public class DynamicScopes {
         //            ------------------
         // 
// Both the shared scope and the per-thread scope have variables 'x' - // defined in them. If 'f' is compiled with dynamic scope enabled, + // defined in them. If 'f' is compiled with dynamic scope enabled, // the 'x' from the per-thread scope will be used. Otherwise, the 'x' // from the shared scope will be used. The 'x' defined in 'g' (which // calls 'f') should not be seen by 'f'. @@ -114,12 +114,12 @@ public class DynamicScopes { for (int i=0; i < threadCount; i++) { String script = "function g() { var x = 'local'; return f(); }" + "java.lang.System.out.println(g());"; - t[i] = new Thread(new PerThread(scope, script, + t[i] = new Thread(new PerThread(scope, script, "thread" + i)); } for (int i=0; i < threadCount; i++) t[i].start(); - // Don't return in this thread until all the spawned threads have + // Don't return in this thread until all the spawned threads have // completed. for (int i=0; i < threadCount; i++) { try { @@ -128,15 +128,15 @@ public class DynamicScopes { } } } - + static class PerThread implements Runnable { - + PerThread(Scriptable scope, String script, String x) { this.scope = scope; this.script = script; this.x = x; - } - + } + public void run() { // We need a new Context for this thread. Context cx = Context.enter(); @@ -144,13 +144,13 @@ public class DynamicScopes { // We can share the scope. Scriptable threadScope = cx.newObject(scope); threadScope.setPrototype(scope); - - // We want "threadScope" to be a new top-level - // scope, so set its parent scope to null. This + + // We want "threadScope" to be a new top-level + // scope, so set its parent scope to null. This // means that any variables created by assignments // will be properties of "threadScope". threadScope.setParentScope(null); - + // Create a JavaScript property of the thread scope named // 'x' and save a value for it. threadScope.put("x", threadScope, x); diff --git a/js/rhino/examples/File.java b/js/rhino/examples/File.java index 9603e99e306..770cde11e04 100644 --- a/js/rhino/examples/File.java +++ b/js/rhino/examples/File.java @@ -64,7 +64,7 @@ import java.util.Vector; * be wrapped as JavaScript exceptions when called from JavaScript, * and may be caught within JavaScript. * - * @author Norris Boyd + * @author Norris Boyd */ public class File extends ScriptableObject { @@ -88,7 +88,7 @@ public class File extends ScriptableObject { * to the use. */ public static Scriptable jsConstructor(Context cx, Object[] args, - Function ctorObj, + Function ctorObj, boolean inNewExpr) { File result = new File(); diff --git a/js/rhino/examples/Foo.java b/js/rhino/examples/Foo.java index 39442109b08..bdf0cf8929c 100644 --- a/js/rhino/examples/Foo.java +++ b/js/rhino/examples/Foo.java @@ -18,7 +18,7 @@ * Copyright (C) 1997-1999 Netscape Communications Corporation. All * Rights Reserved. * - * Contributor(s): + * Contributor(s): * * Alternatively, the contents of this file may be used under the * terms of the GNU Public License (the "GPL"), in which case the diff --git a/js/rhino/examples/Matrix.java b/js/rhino/examples/Matrix.java index 4a8ff5cdf88..bda03adbbb8 100644 --- a/js/rhino/examples/Matrix.java +++ b/js/rhino/examples/Matrix.java @@ -18,7 +18,7 @@ * Copyright (C) 1997-1999 Netscape Communications Corporation. All * Rights Reserved. * - * Contributor(s): + * Contributor(s): * * Alternatively, the contents of this file may be used under the * terms of the GNU Public License (the "GPL"), in which case the @@ -259,7 +259,7 @@ public class Matrix implements Scriptable { public boolean hasInstance(Scriptable value) { Scriptable proto = value.getPrototype(); while (proto != null) { - if (proto.equals(this)) + if (proto.equals(this)) return true; proto = proto.getPrototype(); } diff --git a/js/rhino/examples/PrimitiveWrapFactory.java b/js/rhino/examples/PrimitiveWrapFactory.java index fce2033f3f3..d0fc9097a78 100644 --- a/js/rhino/examples/PrimitiveWrapFactory.java +++ b/js/rhino/examples/PrimitiveWrapFactory.java @@ -18,7 +18,7 @@ * Copyright (C) 1997-1999 Netscape Communications Corporation. All * Rights Reserved. * - * Contributor(s): + * Contributor(s): * Norris Boyd * * Alternatively, the contents of this file may be used under the @@ -44,7 +44,7 @@ import org.mozilla.javascript.*; * converted to ECMA strings. Other types have the default behavior. *

* Note that calling "new java.lang.String('foo')" in JavaScript with this - * wrap factory enabled will still produce a wrapped Java object since the + * wrap factory enabled will still produce a wrapped Java object since the * WrapFactory.wrapNewObject method is not overridden. *

* The PrimitiveWrapFactory is enabled on a Context by calling setWrapFactory @@ -52,8 +52,8 @@ import org.mozilla.javascript.*; */ public class PrimitiveWrapFactory extends WrapFactory { - public Object wrap(Context cx, Scriptable scope, Object obj, - Class staticType) + public Object wrap(Context cx, Scriptable scope, Object obj, + Class staticType) { if (obj instanceof String || obj instanceof Number || obj instanceof Boolean) diff --git a/js/rhino/examples/Shell.java b/js/rhino/examples/Shell.java index 49202201afd..cd4a988d1a7 100644 --- a/js/rhino/examples/Shell.java +++ b/js/rhino/examples/Shell.java @@ -18,7 +18,7 @@ * Copyright (C) 1997-1999 Netscape Communications Corporation. All * Rights Reserved. * - * Contributor(s): + * Contributor(s): * * Alternatively, the contents of this file may be used under the * terms of the GNU Public License (the "GPL"), in which case the diff --git a/js/rhino/src/org/mozilla/javascript/DefaultErrorReporter.java b/js/rhino/src/org/mozilla/javascript/DefaultErrorReporter.java index be22aa8f14c..76858369682 100644 --- a/js/rhino/src/org/mozilla/javascript/DefaultErrorReporter.java +++ b/js/rhino/src/org/mozilla/javascript/DefaultErrorReporter.java @@ -62,7 +62,7 @@ class DefaultErrorReporter implements ErrorReporter { buf.append(')'); return buf.toString(); } - + public void error(String message, String sourceName, int line, String lineSource, int lineOffset) { diff --git a/js/rhino/src/org/mozilla/javascript/NativeFunction.java b/js/rhino/src/org/mozilla/javascript/NativeFunction.java index 162efa5f648..7b70eebfd73 100644 --- a/js/rhino/src/org/mozilla/javascript/NativeFunction.java +++ b/js/rhino/src/org/mozilla/javascript/NativeFunction.java @@ -103,9 +103,9 @@ public class NativeFunction extends BaseFunction { protected String[] argNames; protected short argCount; protected short version; - - /** - * True if this represents function constructed via Function() + + /** + * True if this represents function constructed via Function() * constructor */ boolean fromFunctionConstructor; diff --git a/js/rhino/src/org/mozilla/javascript/debug/DebuggableObject.java b/js/rhino/src/org/mozilla/javascript/debug/DebuggableObject.java index 23fbc32011b..0ed1820bda3 100644 --- a/js/rhino/src/org/mozilla/javascript/debug/DebuggableObject.java +++ b/js/rhino/src/org/mozilla/javascript/debug/DebuggableObject.java @@ -47,7 +47,7 @@ public interface DebuggableObject { /** * Returns an array of ids for the properties of the object. * - *

All properties, even those with attribute {DontEnum}, are listed. + *

All properties, even those with attribute {DontEnum}, are listed. * This allows the debugger to display all properties of the object.

* * @return an array of java.lang.Objects with an entry for every diff --git a/js/rhino/toolsrc/org/mozilla/javascript/tools/debugger/VariableModel.java b/js/rhino/toolsrc/org/mozilla/javascript/tools/debugger/VariableModel.java index 6bbf479f064..e7fbfc9c32f 100644 --- a/js/rhino/toolsrc/org/mozilla/javascript/tools/debugger/VariableModel.java +++ b/js/rhino/toolsrc/org/mozilla/javascript/tools/debugger/VariableModel.java @@ -141,7 +141,7 @@ public class VariableModel extends AbstractTreeTableModel String result; try { if (value instanceof BaseFunction) { - result = ((BaseFunction)value).decompile(cx, 0, + result = ((BaseFunction)value).decompile(cx, 0, false); } else { result = Context.toString(value);