From 95f232fd18403c961b98a56dcd8ddc33d85544f8 Mon Sep 17 00:00:00 2001 From: Ronald Brill Date: Sun, 29 Sep 2024 11:29:39 +0200 Subject: [PATCH] fix a bunch of typos --- .../javascript/ArrayLikeAbstractOperations.java | 2 +- .../java/org/mozilla/javascript/BaseFunction.java | 4 ++-- .../main/java/org/mozilla/javascript/Context.java | 4 ++-- rhino/src/main/java/org/mozilla/javascript/DToA.java | 2 +- .../java/org/mozilla/javascript/ErrorReporter.java | 6 +++--- .../org/mozilla/javascript/EvaluatorException.java | 2 +- .../java/org/mozilla/javascript/FunctionObject.java | 2 +- .../main/java/org/mozilla/javascript/IRFactory.java | 12 ++++++------ .../org/mozilla/javascript/IdScriptableObject.java | 4 ++-- .../java/org/mozilla/javascript/Interpreter.java | 2 +- .../java/org/mozilla/javascript/JavaAdapter.java | 6 +++--- rhino/src/main/java/org/mozilla/javascript/Kit.java | 2 +- .../org/mozilla/javascript/NativeJavaMethod.java | 8 ++++---- .../org/mozilla/javascript/NativeJavaObject.java | 2 +- .../java/org/mozilla/javascript/NativeWeakMap.java | 2 +- rhino/src/main/java/org/mozilla/javascript/Node.java | 2 +- .../main/java/org/mozilla/javascript/SlotMap.java | 2 +- .../main/java/org/mozilla/javascript/StackStyle.java | 2 +- .../src/main/java/org/mozilla/javascript/Symbol.java | 2 +- .../java/org/mozilla/javascript/TokenStream.java | 2 +- .../main/java/org/mozilla/javascript/TopLevel.java | 6 +++--- .../main/java/org/mozilla/javascript/Undefined.java | 2 +- .../javascript/annotations/JSConstructor.java | 2 +- .../mozilla/javascript/annotations/JSFunction.java | 2 +- .../org/mozilla/javascript/annotations/JSGetter.java | 2 +- .../org/mozilla/javascript/annotations/JSSetter.java | 2 +- .../javascript/annotations/JSStaticFunction.java | 2 +- .../java/org/mozilla/javascript/ast/AstNode.java | 2 +- .../org/mozilla/javascript/ast/IdeErrorReporter.java | 4 ++-- .../org/mozilla/javascript/ast/ObjectLiteral.java | 2 +- .../module/provider/ModuleSourceProvider.java | 4 ++-- .../mozilla/javascript/optimizer/ClassCompiler.java | 2 +- .../javascript/typedarrays/NativeFloat32Array.java | 2 +- .../java/org/mozilla/javascript/v8dtoa/FastDtoa.java | 2 +- 34 files changed, 53 insertions(+), 53 deletions(-) diff --git a/rhino/src/main/java/org/mozilla/javascript/ArrayLikeAbstractOperations.java b/rhino/src/main/java/org/mozilla/javascript/ArrayLikeAbstractOperations.java index c35e29635c..a23a3a724c 100644 --- a/rhino/src/main/java/org/mozilla/javascript/ArrayLikeAbstractOperations.java +++ b/rhino/src/main/java/org/mozilla/javascript/ArrayLikeAbstractOperations.java @@ -224,7 +224,7 @@ public static Object reduceMethod( continue; } if (value == NOT_FOUND) { - // no initial value passed, use first element found as inital value + // no initial value passed, use first element found as initial value value = elem; } else { Object[] innerArgs = {value, elem, index, o}; diff --git a/rhino/src/main/java/org/mozilla/javascript/BaseFunction.java b/rhino/src/main/java/org/mozilla/javascript/BaseFunction.java index 5e1ad9b932..5229ac4d7e 100644 --- a/rhino/src/main/java/org/mozilla/javascript/BaseFunction.java +++ b/rhino/src/main/java/org/mozilla/javascript/BaseFunction.java @@ -443,8 +443,8 @@ public Scriptable construct(Context cx, Scriptable scope, Object[] args) { } /** - * Creates new script object. The default implementation of {@link #construct} uses the method - * to to get the value for thisObj argument when invoking {@link #call}. The methos + * Creates new script object. The default implementation of {@link #construct} uses this method + * to to get the value for thisObj argument when invoking {@link #call}. The method * is allowed to return null to indicate that {@link #call} will create a new * object itself. In this case {@link #construct} will set scope and prototype on the result * {@link #call} unless they are already set. diff --git a/rhino/src/main/java/org/mozilla/javascript/Context.java b/rhino/src/main/java/org/mozilla/javascript/Context.java index a34a4d3253..4a3ac3f4b7 100644 --- a/rhino/src/main/java/org/mozilla/javascript/Context.java +++ b/rhino/src/main/java/org/mozilla/javascript/Context.java @@ -136,7 +136,7 @@ public class Context implements Closeable { * when applied to objects and arrays. If hasFeature(FEATURE_TO_STRING_AS_SOURCE) * returns true, calling toString() on JS objects gives the same result as calling * toSource(). That is it returns JS source with code to create an object with all - * enumeratable fields of the original object instead of printing [object result of + * enumerable fields of the original object instead of printing [object result of * {@link Scriptable#getClassName()}]. * *

By default {@link #hasFeature(int)} returns true only if the current JS version is set to @@ -622,7 +622,7 @@ public final void seal(Object sealKey) { /** * Unseal previously sealed Context object. The sealKey argument should not be null - * and should match sealKey suplied with the last call to {@link #seal(Object)} or + * and should match sealKey supplied with the last call to {@link #seal(Object)} or * an exception will be thrown. * * @see #isSealed() diff --git a/rhino/src/main/java/org/mozilla/javascript/DToA.java b/rhino/src/main/java/org/mozilla/javascript/DToA.java index af291dd79a..afa8da605b 100644 --- a/rhino/src/main/java/org/mozilla/javascript/DToA.java +++ b/rhino/src/main/java/org/mozilla/javascript/DToA.java @@ -387,7 +387,7 @@ static int word1(double d) { return (int) dBits; } - /* Return b * 5^k. k must be nonnegative. */ + /* Return b * 5^k. k must be non negative. */ // XXXX the C version built a cache of these static BigInteger pow5mult(BigInteger b, int k) { return b.multiply(BigInteger.valueOf(5).pow(k)); diff --git a/rhino/src/main/java/org/mozilla/javascript/ErrorReporter.java b/rhino/src/main/java/org/mozilla/javascript/ErrorReporter.java index 8f62d640af..324c7148d4 100644 --- a/rhino/src/main/java/org/mozilla/javascript/ErrorReporter.java +++ b/rhino/src/main/java/org/mozilla/javascript/ErrorReporter.java @@ -22,7 +22,7 @@ public interface ErrorReporter { *

The implementing class may choose to ignore the warning if it desires. * * @param message a String describing the warning - * @param sourceName a String describing the JavaScript source where the warning occured; + * @param sourceName a String describing the JavaScript source where the warning occurred; * typically a filename or URL * @param line the line number associated with the warning * @param lineSource the text of the line (may be null) @@ -40,7 +40,7 @@ public interface ErrorReporter { * however. * * @param message a String describing the error - * @param sourceName a String describing the JavaScript source where the error occured; + * @param sourceName a String describing the JavaScript source where the error occurred; * typically a filename or URL * @param line the line number associated with the error * @param lineSource the text of the line (may be null) @@ -54,7 +54,7 @@ public interface ErrorReporter { *

runtimeErrors, unlike errors, will always terminate the current script. * * @param message a String describing the error - * @param sourceName a String describing the JavaScript source where the error occured; + * @param sourceName a String describing the JavaScript source where the error occurred; * typically a filename or URL * @param line the line number associated with the error * @param lineSource the text of the line (may be null) diff --git a/rhino/src/main/java/org/mozilla/javascript/EvaluatorException.java b/rhino/src/main/java/org/mozilla/javascript/EvaluatorException.java index b03747aad0..4572c3b56e 100644 --- a/rhino/src/main/java/org/mozilla/javascript/EvaluatorException.java +++ b/rhino/src/main/java/org/mozilla/javascript/EvaluatorException.java @@ -20,7 +20,7 @@ public EvaluatorException(String detail) { *

Errors internal to the JavaScript engine will simply throw a RuntimeException. * * @param detail the error message - * @param sourceName the name of the source reponsible for the error + * @param sourceName the name of the source responsible for the error * @param lineNumber the line number of the source */ public EvaluatorException(String detail, String sourceName, int lineNumber) { diff --git a/rhino/src/main/java/org/mozilla/javascript/FunctionObject.java b/rhino/src/main/java/org/mozilla/javascript/FunctionObject.java index e3b73a2ff0..e5fa959d15 100644 --- a/rhino/src/main/java/org/mozilla/javascript/FunctionObject.java +++ b/rhino/src/main/java/org/mozilla/javascript/FunctionObject.java @@ -147,7 +147,7 @@ public FunctionObject(String name, Member methodOrConstructor, Scriptable scope) /** * @return One of JAVA_*_TYPE constants to indicate desired type or {@link - * #JAVA_UNSUPPORTED_TYPE} if the convertion is not possible + * #JAVA_UNSUPPORTED_TYPE} if the conversion is not possible */ public static int getTypeTag(Class type) { if (type == ScriptRuntime.StringClass) return JAVA_STRING_TYPE; diff --git a/rhino/src/main/java/org/mozilla/javascript/IRFactory.java b/rhino/src/main/java/org/mozilla/javascript/IRFactory.java index 8e108c38c5..283d6f15ab 100644 --- a/rhino/src/main/java/org/mozilla/javascript/IRFactory.java +++ b/rhino/src/main/java/org/mozilla/javascript/IRFactory.java @@ -1118,7 +1118,7 @@ private Node transformTry(TryStatement node) { private Node transformUnary(UnaryExpression node) { int type = node.getType(); if (type == Token.DEFAULTNAMESPACE) { - return transformDefaultXmlNamepace(node); + return transformDefaultXmlNamespace(node); } Node child = transform(node.getOperand()); @@ -1274,7 +1274,7 @@ private Node transformXmlRef(Node pn, XmlRef node, int memberTypeFlags) { return createElementGet(pn, ns, expr, memberTypeFlags); } - private Node transformDefaultXmlNamepace(UnaryExpression node) { + private Node transformDefaultXmlNamespace(UnaryExpression node) { Node child = transform(node.getOperand()); return createUnary(Token.DEFAULTNAMESPACE, child); } @@ -1645,10 +1645,10 @@ private Node createTryCatchFinally( // after_catch: // // If there is no default catch, then the last with block - // arround "somethingDefault;" is replaced by "rethrow;" + // around "somethingDefault;" is replaced by "rethrow;" // It is assumed that catch handler generation will store - // exeception object in handlerBlock register + // exception object in handlerBlock register // Block with local for exception scope objects Node catchScopeBlock = new Node(Token.LOCAL_BLOCK); @@ -2008,7 +2008,7 @@ private static Node createBinary(int nodeType, Node left, Node right) { } // can't do anything if we don't know both types - since // 0 + object is supposed to call toString on the object and do - // string concantenation rather than addition + // string concatenation rather than addition break; case Token.SUB: @@ -2064,7 +2064,7 @@ private static Node createBinary(int nodeType, Node left, Node right) { return left; } else if (rd == 1.0) { // second 1: x/1 -> +x - // not simply x to force number convertion + // not simply x to force number conversion return new Node(Token.POS, left); } } diff --git a/rhino/src/main/java/org/mozilla/javascript/IdScriptableObject.java b/rhino/src/main/java/org/mozilla/javascript/IdScriptableObject.java index d617123811..aca8cb710b 100644 --- a/rhino/src/main/java/org/mozilla/javascript/IdScriptableObject.java +++ b/rhino/src/main/java/org/mozilla/javascript/IdScriptableObject.java @@ -66,7 +66,7 @@ final void initValue(int id, String name, Object value, int attributes) { if (id == constructorId) { if (!(value instanceof IdFunctionObject)) { throw new IllegalArgumentException( - "consructor should be initialized with IdFunctionObject"); + "constructor should be initialized with IdFunctionObject"); } constructor = (IdFunctionObject) value; constructorAttrs = (short) attributes; @@ -86,7 +86,7 @@ final void initValue(int id, Symbol key, Object value, int attributes) { if (id == constructorId) { if (!(value instanceof IdFunctionObject)) { throw new IllegalArgumentException( - "consructor should be initialized with IdFunctionObject"); + "constructor should be initialized with IdFunctionObject"); } constructor = (IdFunctionObject) value; constructorAttrs = (short) attributes; diff --git a/rhino/src/main/java/org/mozilla/javascript/Interpreter.java b/rhino/src/main/java/org/mozilla/javascript/Interpreter.java index 0bcb7fadaa..461ea7c6d9 100644 --- a/rhino/src/main/java/org/mozilla/javascript/Interpreter.java +++ b/rhino/src/main/java/org/mozilla/javascript/Interpreter.java @@ -3305,7 +3305,7 @@ private static CallFrame processThrowable( // Continuation jump is almost done: capturedFrame // points to the call to the function that captured // continuation, so clone capturedFrame and - // emulate return that function with the suplied result + // emulate return that function with the supplied result frame = cjump.capturedFrame.cloneFrozen(); setCallResult(frame, cjump.result, cjump.resultDbl); // restart the execution diff --git a/rhino/src/main/java/org/mozilla/javascript/JavaAdapter.java b/rhino/src/main/java/org/mozilla/javascript/JavaAdapter.java index a7340a2541..168300fec7 100644 --- a/rhino/src/main/java/org/mozilla/javascript/JavaAdapter.java +++ b/rhino/src/main/java/org/mozilla/javascript/JavaAdapter.java @@ -943,13 +943,13 @@ private static void generateMethod( throw Context.reportRuntimeErrorById( "JavaAdapter can not subclass methods with more then" + " 64 arguments."); } - long convertionMask = 0; + long conversionMask = 0; for (int i = 0; i != parms.length; ++i) { if (!parms[i].isPrimitive()) { - convertionMask |= (1 << i); + conversionMask |= (1 << i); } } - cfw.addPush(convertionMask); + cfw.addPush(conversionMask); // go through utility method, which creates a Context to run the // method in. diff --git a/rhino/src/main/java/org/mozilla/javascript/Kit.java b/rhino/src/main/java/org/mozilla/javascript/Kit.java index db6f86329f..9464bb8627 100644 --- a/rhino/src/main/java/org/mozilla/javascript/Kit.java +++ b/rhino/src/main/java/org/mozilla/javascript/Kit.java @@ -71,7 +71,7 @@ static boolean testIfCanLoadRhinoClasses(ClassLoader loader) { /** * If character c is a hexadecimal digit, return accumulator * 16 plus - * corresponding number. Otherise return -1. + * corresponding number. Otherwise return -1. */ public static int xDigitToInt(int c, int accumulator) { check: diff --git a/rhino/src/main/java/org/mozilla/javascript/NativeJavaMethod.java b/rhino/src/main/java/org/mozilla/javascript/NativeJavaMethod.java index ffc44cf143..4c9112e9d8 100644 --- a/rhino/src/main/java/org/mozilla/javascript/NativeJavaMethod.java +++ b/rhino/src/main/java/org/mozilla/javascript/NativeJavaMethod.java @@ -323,9 +323,9 @@ static int findFunction(Context cx, MemberBox[] methodsOrCtors, Object[] args) { // The loop starts from -1 denoting firstBestFit and proceed // until extraBestFitsCount to avoid extraBestFits allocation // in the most common case of no ambiguity - int betterCount = 0; // number of times member was prefered over + int betterCount = 0; // number of times member was preferred over // best fits - int worseCount = 0; // number of times best fits were prefered + int worseCount = 0; // number of times best fits were preferred // over member for (int j = -1; j != extraBestFitsCount; ++j) { int bestFitIndex; @@ -386,12 +386,12 @@ static int findFunction(Context cx, MemberBox[] methodsOrCtors, Object[] args) { } } if (betterCount == 1 + extraBestFitsCount) { - // member was prefered over all best fits + // member was preferred over all best fits if (debug) printDebug("New first applicable ", member, args); firstBestFit = i; extraBestFitsCount = 0; } else if (worseCount == 1 + extraBestFitsCount) { - // all best fits were prefered over member, ignore it + // all best fits were preferred over member, ignore it if (debug) printDebug("Rejecting (all current bests better) ", member, args); } else { // some ambiguity was present, add member to best fit set diff --git a/rhino/src/main/java/org/mozilla/javascript/NativeJavaObject.java b/rhino/src/main/java/org/mozilla/javascript/NativeJavaObject.java index 033737b68f..d0b29162a6 100644 --- a/rhino/src/main/java/org/mozilla/javascript/NativeJavaObject.java +++ b/rhino/src/main/java/org/mozilla/javascript/NativeJavaObject.java @@ -739,7 +739,7 @@ private static Object coerceToNumber(Class type, Object value) { /* Long values cannot be expressed exactly in doubles. * We thus use the largest and smallest double value that * has a value expressible as a long value. We build these - * numerical values from their hexidecimal representations + * numerical values from their hexadecimal representations * to avoid any problems caused by attempting to parse a * decimal representation. */ diff --git a/rhino/src/main/java/org/mozilla/javascript/NativeWeakMap.java b/rhino/src/main/java/org/mozilla/javascript/NativeWeakMap.java index 43f480a784..98075a4668 100644 --- a/rhino/src/main/java/org/mozilla/javascript/NativeWeakMap.java +++ b/rhino/src/main/java/org/mozilla/javascript/NativeWeakMap.java @@ -12,7 +12,7 @@ /** * This is an implementation of the ES6 WeakMap class. As per the spec, keys must be ordinary - * objects. Since there is no defined "equality" for objects, comparisions are done strictly by + * objects. Since there is no defined "equality" for objects, comparisons are done strictly by * object equality. Both ES6 and the java.util.WeakHashMap class have the same basic structure -- * entries are removed automatically when the sole remaining reference to the key is a weak * reference. Therefore, we can use WeakHashMap as the basis of this implementation and preserve the diff --git a/rhino/src/main/java/org/mozilla/javascript/Node.java b/rhino/src/main/java/org/mozilla/javascript/Node.java index 47cee265af..25e57a58e6 100644 --- a/rhino/src/main/java/org/mozilla/javascript/Node.java +++ b/rhino/src/main/java/org/mozilla/javascript/Node.java @@ -807,7 +807,7 @@ private int endCheckBlock() { Node n; int rv = END_DROPS_OFF; - // check each statment and if the statement can continue onto the next + // check each statement and if the statement can continue onto the next // one, then check the next statement for (n = first; ((rv & END_DROPS_OFF) != 0) && n != null; n = n.next) { rv &= ~END_DROPS_OFF; diff --git a/rhino/src/main/java/org/mozilla/javascript/SlotMap.java b/rhino/src/main/java/org/mozilla/javascript/SlotMap.java index 7a5aa5bfdb..b614ae056e 100644 --- a/rhino/src/main/java/org/mozilla/javascript/SlotMap.java +++ b/rhino/src/main/java/org/mozilla/javascript/SlotMap.java @@ -54,7 +54,7 @@ public interface SlotComputer { * Replace the value of key with the slot computed by the "compute" method. If "compute" throws * an exception, make no change. If "compute" returns null, remove the mapping, otherwise, * replace any existing mapping with the result of "compute", and create a new mapping if none - * exists. This is equivalant to the "compute" method on the Map interface, which simplifies + * exists. This is equivalent to the "compute" method on the Map interface, which simplifies * code and is more efficient than making multiple calls to this interface. In order to allow * use of multiple Slot subclasses, this function is templatized. */ diff --git a/rhino/src/main/java/org/mozilla/javascript/StackStyle.java b/rhino/src/main/java/org/mozilla/javascript/StackStyle.java index 1805e9a563..4bda7708d4 100644 --- a/rhino/src/main/java/org/mozilla/javascript/StackStyle.java +++ b/rhino/src/main/java/org/mozilla/javascript/StackStyle.java @@ -19,7 +19,7 @@ public enum StackStyle { MOZILLA, /** - * This is the same as MOZILLA but uses LF as speparator instead of the system dependent line + * This is the same as MOZILLA but uses LF as separator instead of the system dependent line * separator. */ MOZILLA_LF, diff --git a/rhino/src/main/java/org/mozilla/javascript/Symbol.java b/rhino/src/main/java/org/mozilla/javascript/Symbol.java index 181708401b..8370c58d39 100644 --- a/rhino/src/main/java/org/mozilla/javascript/Symbol.java +++ b/rhino/src/main/java/org/mozilla/javascript/Symbol.java @@ -7,7 +7,7 @@ package org.mozilla.javascript; /** - * A Symbol is a JavaScript objecy that obeys the special properties of the Symbol prototype. This + * A Symbol is a JavaScript object that obeys the special properties of the Symbol prototype. This * interface lets us possibly support multiple implementations of Symbol. * * @since 1.7.8 diff --git a/rhino/src/main/java/org/mozilla/javascript/TokenStream.java b/rhino/src/main/java/org/mozilla/javascript/TokenStream.java index c227d4fa84..adb4789be7 100644 --- a/rhino/src/main/java/org/mozilla/javascript/TokenStream.java +++ b/rhino/src/main/java/org/mozilla/javascript/TokenStream.java @@ -2244,7 +2244,7 @@ private final int charAt(int index) { // ignore it, we're already displaying an error... return EOF_CHAR; } - // index recalculuation as fillSourceBuffer can move saved + // index recalculation as fillSourceBuffer can move saved // line buffer and change sourceCursor index -= (oldSourceCursor - sourceCursor); } diff --git a/rhino/src/main/java/org/mozilla/javascript/TopLevel.java b/rhino/src/main/java/org/mozilla/javascript/TopLevel.java index 6a4505b1c1..2906b51639 100644 --- a/rhino/src/main/java/org/mozilla/javascript/TopLevel.java +++ b/rhino/src/main/java/org/mozilla/javascript/TopLevel.java @@ -25,9 +25,9 @@ * *

Calling {@link org.mozilla.javascript.Context#initStandardObjects()} with an instance of this * class as argument will automatically cache built-in classes after initialization. For other - * setups involving top-level scopes that inherit global properties from their proptotypes (e.g. - * with dynamic scopes) embeddings should explicitly call {@link #cacheBuiltins(Scriptable, - * boolean)} to initialize the class cache for each top-level scope. + * setups involving top-level scopes that inherit global properties from their prototypes (e.g. with + * dynamic scopes) embeddings should explicitly call {@link #cacheBuiltins(Scriptable, boolean)} to + * initialize the class cache for each top-level scope. */ public class TopLevel extends IdScriptableObject { diff --git a/rhino/src/main/java/org/mozilla/javascript/Undefined.java b/rhino/src/main/java/org/mozilla/javascript/Undefined.java index 6d09126831..5abf833b4d 100644 --- a/rhino/src/main/java/org/mozilla/javascript/Undefined.java +++ b/rhino/src/main/java/org/mozilla/javascript/Undefined.java @@ -49,7 +49,7 @@ public int hashCode() { /** * An alternate representation of undefined, to be used only when we need to pass it to a method * that takes as Scriptable as a parameter. This is used when we need to pass undefined as the - * "this" parmeter of a Callable instance, because we cannot change that interface without + * "this" parameter of a Callable instance, because we cannot change that interface without * breaking backward compatibility. */ public static final Scriptable SCRIPTABLE_UNDEFINED = diff --git a/rhino/src/main/java/org/mozilla/javascript/annotations/JSConstructor.java b/rhino/src/main/java/org/mozilla/javascript/annotations/JSConstructor.java index 5243370ece..ca2b2622a4 100644 --- a/rhino/src/main/java/org/mozilla/javascript/annotations/JSConstructor.java +++ b/rhino/src/main/java/org/mozilla/javascript/annotations/JSConstructor.java @@ -12,7 +12,7 @@ /** * An annotation that marks a Java method as JavaScript constructor. This can be used as an - * alternative to the jsConstructor naming convention desribed in {@link + * alternative to the jsConstructor naming convention described in {@link * org.mozilla.javascript.ScriptableObject#defineClass(org.mozilla.javascript.Scriptable, * java.lang.Class)}. */ diff --git a/rhino/src/main/java/org/mozilla/javascript/annotations/JSFunction.java b/rhino/src/main/java/org/mozilla/javascript/annotations/JSFunction.java index ff5f669cf8..25c1ae425c 100644 --- a/rhino/src/main/java/org/mozilla/javascript/annotations/JSFunction.java +++ b/rhino/src/main/java/org/mozilla/javascript/annotations/JSFunction.java @@ -12,7 +12,7 @@ /** * An annotation that marks a Java method as JavaScript function. This can be used as an alternative - * to the jsFunction_ prefix desribed in {@link + * to the jsFunction_ prefix described in {@link * org.mozilla.javascript.ScriptableObject#defineClass(org.mozilla.javascript.Scriptable, * java.lang.Class)}. */ diff --git a/rhino/src/main/java/org/mozilla/javascript/annotations/JSGetter.java b/rhino/src/main/java/org/mozilla/javascript/annotations/JSGetter.java index 05fcd7c736..5a501807e5 100644 --- a/rhino/src/main/java/org/mozilla/javascript/annotations/JSGetter.java +++ b/rhino/src/main/java/org/mozilla/javascript/annotations/JSGetter.java @@ -12,7 +12,7 @@ /** * An annotation that marks a Java method as JavaScript getter. This can be used as an alternative - * to the jsGet_ prefix desribed in {@link + * to the jsGet_ prefix described in {@link * org.mozilla.javascript.ScriptableObject#defineClass(org.mozilla.javascript.Scriptable, * java.lang.Class)}. */ diff --git a/rhino/src/main/java/org/mozilla/javascript/annotations/JSSetter.java b/rhino/src/main/java/org/mozilla/javascript/annotations/JSSetter.java index 704b15f8e6..c725999c7f 100644 --- a/rhino/src/main/java/org/mozilla/javascript/annotations/JSSetter.java +++ b/rhino/src/main/java/org/mozilla/javascript/annotations/JSSetter.java @@ -12,7 +12,7 @@ /** * An annotation that marks a Java method as JavaScript setter. This can be used as an alternative - * to the jsSet_ prefix desribed in {@link + * to the jsSet_ prefix described in {@link * org.mozilla.javascript.ScriptableObject#defineClass(org.mozilla.javascript.Scriptable, * java.lang.Class)}. */ diff --git a/rhino/src/main/java/org/mozilla/javascript/annotations/JSStaticFunction.java b/rhino/src/main/java/org/mozilla/javascript/annotations/JSStaticFunction.java index bd785a2e88..f49f2e89bc 100644 --- a/rhino/src/main/java/org/mozilla/javascript/annotations/JSStaticFunction.java +++ b/rhino/src/main/java/org/mozilla/javascript/annotations/JSStaticFunction.java @@ -12,7 +12,7 @@ /** * An annotation that marks a Java method as JavaScript static function. This can be used as an - * alternative to the jsStaticFunction_ prefix desribed in {@link + * alternative to the jsStaticFunction_ prefix described in {@link * org.mozilla.javascript.ScriptableObject#defineClass(org.mozilla.javascript.Scriptable, * java.lang.Class)}. */ diff --git a/rhino/src/main/java/org/mozilla/javascript/ast/AstNode.java b/rhino/src/main/java/org/mozilla/javascript/ast/AstNode.java index da70271446..ea5c6f3fd5 100644 --- a/rhino/src/main/java/org/mozilla/javascript/ast/AstNode.java +++ b/rhino/src/main/java/org/mozilla/javascript/ast/AstNode.java @@ -522,7 +522,7 @@ public Scope getEnclosingScope() { * @param other another node * @return -1 if this node's start position is less than {@code other}'s start position. If * tied, -1 if this node's length is less than {@code other}'s length. If the lengths are - * equal, sorts abitrarily on hashcode unless the nodes are the same per {@link #equals}. + * equal, sorts arbitrarily on hashcode unless the nodes are the same per {@link #equals}. */ @Override public int compareTo(AstNode other) { diff --git a/rhino/src/main/java/org/mozilla/javascript/ast/IdeErrorReporter.java b/rhino/src/main/java/org/mozilla/javascript/ast/IdeErrorReporter.java index 2dc03fbc29..f798474ae6 100644 --- a/rhino/src/main/java/org/mozilla/javascript/ast/IdeErrorReporter.java +++ b/rhino/src/main/java/org/mozilla/javascript/ast/IdeErrorReporter.java @@ -35,7 +35,7 @@ public interface IdeErrorReporter extends ErrorReporter { * * @param message a {@code String} describing the warning * @param sourceName a {@code String} describing the JavaScript source where the warning - * occured; typically a filename or URL + * occurred; typically a filename or URL * @param offset the warning's 0-indexed char position in the input stream * @param length the length of the region contributing to the warning */ @@ -53,7 +53,7 @@ public interface IdeErrorReporter extends ErrorReporter { *

* * @param message a String describing the error - * @param sourceName a String describing the JavaScript source where the error occured; + * @param sourceName a String describing the JavaScript source where the error occurred; * typically a filename or URL * @param offset 0-indexed char position of the error in the input stream * @param length the length of the region contributing to the error diff --git a/rhino/src/main/java/org/mozilla/javascript/ast/ObjectLiteral.java b/rhino/src/main/java/org/mozilla/javascript/ast/ObjectLiteral.java index d761d974b8..f1e974966c 100644 --- a/rhino/src/main/java/org/mozilla/javascript/ast/ObjectLiteral.java +++ b/rhino/src/main/java/org/mozilla/javascript/ast/ObjectLiteral.java @@ -12,7 +12,7 @@ import org.mozilla.javascript.Token; /** - * AST node for an Object literal (also called an Object initialiser in Ecma-262). The elements list + * AST node for an Object literal (also called an Object initializer in Ecma-262). The elements list * will always be non-{@code null}, although the list will have no elements if the Object literal is * empty. * diff --git a/rhino/src/main/java/org/mozilla/javascript/commonjs/module/provider/ModuleSourceProvider.java b/rhino/src/main/java/org/mozilla/javascript/commonjs/module/provider/ModuleSourceProvider.java index 7bfffce84e..728f0c4849 100644 --- a/rhino/src/main/java/org/mozilla/javascript/commonjs/module/provider/ModuleSourceProvider.java +++ b/rhino/src/main/java/org/mozilla/javascript/commonjs/module/provider/ModuleSourceProvider.java @@ -32,7 +32,7 @@ public interface ModuleSourceProvider { * current cached representation of the resource (using whatever semantics for validation that * this source provider implements), then {@link #NOT_MODIFIED} should be returned. Otherwise, * it should return a {@link ModuleSource} object with the actual source text of the module, - * preferrably a validator for it, and a security domain, where applicable. + * preferably a validator for it, and a security domain, where applicable. * * @param moduleId the ID of the module. An implementation must only accept an absolute ID, * starting with a term. @@ -65,7 +65,7 @@ public ModuleSource loadSource(String moduleId, Scriptable paths, Object validat * the provider would use to load the source, and the validator validates the current cached * representation of the resource (using whatever semantics for validation that this source * provider implements), then {@link #NOT_MODIFIED} should be returned. Otherwise, it should - * return a {@link ModuleSource} object with the actual source text of the module, preferrably a + * return a {@link ModuleSource} object with the actual source text of the module, preferably a * validator for it, and a security domain, where applicable. * * @param uri the absolute URI from which to load the module source, but without an extension diff --git a/rhino/src/main/java/org/mozilla/javascript/optimizer/ClassCompiler.java b/rhino/src/main/java/org/mozilla/javascript/optimizer/ClassCompiler.java index 15de52d1c1..5abe7e8841 100644 --- a/rhino/src/main/java/org/mozilla/javascript/optimizer/ClassCompiler.java +++ b/rhino/src/main/java/org/mozilla/javascript/optimizer/ClassCompiler.java @@ -37,7 +37,7 @@ public ClassCompiler(CompilerEnvirons compilerEnv) { * Set the class name to use for main method implementation. The class must have a method * matching public static void main(Script sc, String[] args), it will be called * when main(String[] args) is called in the generated class. The class name should - * be fully qulified name and include the package name like in org.foo.Bar. + * be fully qualified name and include the package name like in org.foo.Bar. */ public void setMainMethodClass(String className) { // XXX Should this check for a valid class name? diff --git a/rhino/src/main/java/org/mozilla/javascript/typedarrays/NativeFloat32Array.java b/rhino/src/main/java/org/mozilla/javascript/typedarrays/NativeFloat32Array.java index 9f8b757fcb..cddbc8c02d 100644 --- a/rhino/src/main/java/org/mozilla/javascript/typedarrays/NativeFloat32Array.java +++ b/rhino/src/main/java/org/mozilla/javascript/typedarrays/NativeFloat32Array.java @@ -14,7 +14,7 @@ import org.mozilla.javascript.Undefined; /** - * An array view that stores 32-bit quantities and implements the JavaScript "loat32Array" + * An array view that stores 32-bit quantities and implements the JavaScript "Float32Array" * interface. It also implements List<Float> for direct manipulation in Java. */ public class NativeFloat32Array extends NativeTypedArrayView { diff --git a/rhino/src/main/java/org/mozilla/javascript/v8dtoa/FastDtoa.java b/rhino/src/main/java/org/mozilla/javascript/v8dtoa/FastDtoa.java index 4db5985ca0..9226d0a66c 100644 --- a/rhino/src/main/java/org/mozilla/javascript/v8dtoa/FastDtoa.java +++ b/rhino/src/main/java/org/mozilla/javascript/v8dtoa/FastDtoa.java @@ -472,7 +472,7 @@ static boolean grisu3(double v, FastDtoaBuilder buffer) { // the difference between w and boundary_minus/plus (a power of 2) and to // compute scaled_boundary_minus/plus by subtracting/adding from // scaled_w. However the code becomes much less readable and the speed - // enhancements are not terriffic. + // enhancements are not terrific. DiyFp scaled_boundary_minus = DiyFp.times(boundary_minus, ten_mk); DiyFp scaled_boundary_plus = DiyFp.times(boundary_plus, ten_mk);