From 82bcf4512a76cd1442e0e209b36e0d5cf866bf97 Mon Sep 17 00:00:00 2001 From: Greg Brail Date: Mon, 16 Sep 2024 16:01:29 -0700 Subject: [PATCH] All the changes required for a formatter upgrade These are the changes driven by spotless when we upgrade google-java-format from 1.10.0, which is very old, to 1.23.0, which is the latest. --- .../main/groovy/rhino.java-conventions.gradle | 2 +- .../javascript/tools/debugger/Main.java | 24 ++- .../mozilla/javascript/tools/jsc/Main.java | 4 +- .../javascript/tools/shell/Global.java | 4 +- .../javascript/tools/shell/ShellConsole.java | 12 +- .../org/mozilla/javascript/xmlimpl/QName.java | 4 +- .../javascript/xmlimpl/XMLLibImpl.java | 12 +- .../mozilla/javascript/xmlimpl/XMLName.java | 12 +- .../mozilla/javascript/xmlimpl/XmlNode.java | 4 +- .../mozilla/classfile/ClassFileWriter.java | 34 +-- .../org/mozilla/javascript/BaseFunction.java | 4 +- .../org/mozilla/javascript/ClassCache.java | 4 +- .../org/mozilla/javascript/CodeGenerator.java | 4 +- .../mozilla/javascript/CompilerEnvirons.java | 4 +- .../java/org/mozilla/javascript/Context.java | 24 ++- .../mozilla/javascript/ContextFactory.java | 4 +- .../mozilla/javascript/ContextListener.java | 8 +- .../javascript/ContinuationPending.java | 8 +- .../java/org/mozilla/javascript/DToA.java | 6 +- .../org/mozilla/javascript/Delegator.java | 68 ++++-- .../org/mozilla/javascript/EcmaError.java | 20 +- .../javascript/EvaluatorException.java | 16 +- .../mozilla/javascript/ImporterTopLevel.java | 4 +- .../org/mozilla/javascript/Interpreter.java | 10 +- .../javascript/JavaScriptException.java | 12 +- .../org/mozilla/javascript/NativeArray.java | 4 +- .../org/mozilla/javascript/NativeConsole.java | 4 +- .../org/mozilla/javascript/NativeDate.java | 14 +- .../org/mozilla/javascript/NativeGlobal.java | 4 +- .../mozilla/javascript/NativeJavaPackage.java | 8 +- .../org/mozilla/javascript/NativeNumber.java | 4 +- .../org/mozilla/javascript/NativeScript.java | 4 +- .../org/mozilla/javascript/NativeString.java | 4 +- .../mozilla/javascript/NodeTransformer.java | 4 +- .../java/org/mozilla/javascript/Parser.java | 22 +- .../main/java/org/mozilla/javascript/Ref.java | 4 +- .../org/mozilla/javascript/ScriptRuntime.java | 98 ++++++--- .../org/mozilla/javascript/SecureCaller.java | 4 +- .../mozilla/javascript/SecurityUtilities.java | 4 +- .../org/mozilla/javascript/Synchronizer.java | 4 +- .../org/mozilla/javascript/TokenStream.java | 4 +- .../org/mozilla/javascript/WrapFactory.java | 4 +- .../mozilla/javascript/WrappedException.java | 8 +- .../org/mozilla/javascript/ast/AstNode.java | 4 +- .../mozilla/javascript/ast/ScriptNode.java | 4 +- .../mozilla/javascript/optimizer/Block.java | 2 +- .../javascript/optimizer/OptRuntime.java | 4 +- .../javascript/regexp/NativeRegExp.java | 36 ++-- .../org/mozilla/javascript/SlotMapTest.java | 8 +- .../javascript/tests/Bug491621Test.java | 4 +- .../javascript/tests/Bug637811Test.java | 4 +- .../javascript/tests/Bug685403Test.java | 4 +- .../javascript/tests/Bug687669Test.java | 4 +- .../javascript/tests/Bug688018Test.java | 4 +- .../javascript/tests/Bug688021Test.java | 4 +- .../javascript/tests/Bug688023Test.java | 4 +- .../javascript/tests/Bug689308Test.java | 4 +- .../javascript/tests/Bug689314Test.java | 4 +- .../javascript/tests/Bug708801Test.java | 4 +- .../javascript/tests/Bug714204Test.java | 4 +- .../javascript/tests/Bug782363Test.java | 4 +- .../javascript/tests/Bug783797Test.java | 4 +- .../javascript/tests/Bug789277Test.java | 4 +- .../tests/ClassShutterExceptionTest.java | 4 +- .../javascript/tests/NativeJsonTest.java | 4 +- .../javascript/tests/NativeRegExpTest.java | 196 +++++++++++++----- .../javascript/tests/WrapFactoryTest.java | 4 +- .../mozilla/javascript/drivers/JsDriver.java | 4 +- .../mozilla/javascript/drivers/ShellTest.java | 4 +- .../tests/JavaAcessibilityTest.java | 4 +- .../tests/ObserveInstructionCountTest.java | 4 +- .../javascript/tests/StackTraceTest.java | 4 +- .../javascript/tests/Test262SuiteTest.java | 4 +- .../tests/WriteReadOnlyPropertyTest.java | 8 +- .../tests/commentspr465/IfCommentsTest.java | 4 +- .../tests/commentspr465/LoopCommentsTest.java | 4 +- .../tests/commentspr465/MiscCommentsTest.java | 4 +- .../commentspr465/SwitchCommentsTest.java | 4 +- .../tests/es5/Test262RegExpTest.java | 4 +- .../tests/es6/FunctionNullSetTest.java | 4 +- .../tests/es6/NativeObjectTest.java | 4 +- .../tests/es6/NativeRegExpTest.java | 4 +- .../tests/es6/TypedArrayJavaTest.java | 4 +- .../tests/intl402/NativeStringTest.java | 4 +- 84 files changed, 641 insertions(+), 263 deletions(-) diff --git a/buildSrc/src/main/groovy/rhino.java-conventions.gradle b/buildSrc/src/main/groovy/rhino.java-conventions.gradle index 581f74792b..75a16393a1 100644 --- a/buildSrc/src/main/groovy/rhino.java-conventions.gradle +++ b/buildSrc/src/main/groovy/rhino.java-conventions.gradle @@ -49,7 +49,7 @@ spotless { // This will have to be changed when Java 11 support is removed. if (JavaVersion.current() == JavaVersion.VERSION_21) { java { - googleJavaFormat('1.17.0').aosp() + googleJavaFormat('1.23.0').aosp() } } else { System.out.println("Not running Spotless: Java language version is " + JavaVersion.current()) diff --git a/rhino-tools/src/main/java/org/mozilla/javascript/tools/debugger/Main.java b/rhino-tools/src/main/java/org/mozilla/javascript/tools/debugger/Main.java index 3b57add10b..2971e07dac 100644 --- a/rhino-tools/src/main/java/org/mozilla/javascript/tools/debugger/Main.java +++ b/rhino-tools/src/main/java/org/mozilla/javascript/tools/debugger/Main.java @@ -242,35 +242,47 @@ private static Main mainEmbeddedImpl( // Deprecated methods - /** @deprecated Use {@link #setSize(int, int)} instead. */ + /** + * @deprecated Use {@link #setSize(int, int)} instead. + */ @Deprecated public void setSize(java.awt.Dimension dimension) { debugGui.setSize(dimension.width, dimension.height); } - /** @deprecated The method does nothing and is only present for compatibility. */ + /** + * @deprecated The method does nothing and is only present for compatibility. + */ @Deprecated public void setOptimizationLevel(int level) {} - /** @deprecated The method is only present for compatibility and should not be called. */ + /** + * @deprecated The method is only present for compatibility and should not be called. + */ @Deprecated public void contextEntered(Context cx) { throw new IllegalStateException(); } - /** @deprecated The method is only present for compatibility and should not be called. */ + /** + * @deprecated The method is only present for compatibility and should not be called. + */ @Deprecated public void contextExited(Context cx) { throw new IllegalStateException(); } - /** @deprecated The method is only present for compatibility and should not be called. */ + /** + * @deprecated The method is only present for compatibility and should not be called. + */ @Deprecated public void contextCreated(Context cx) { throw new IllegalStateException(); } - /** @deprecated The method is only present for compatibility and should not be called. */ + /** + * @deprecated The method is only present for compatibility and should not be called. + */ @Deprecated public void contextReleased(Context cx) { throw new IllegalStateException(); diff --git a/rhino-tools/src/main/java/org/mozilla/javascript/tools/jsc/Main.java b/rhino-tools/src/main/java/org/mozilla/javascript/tools/jsc/Main.java index a34e18f747..bd6a61a884 100644 --- a/rhino-tools/src/main/java/org/mozilla/javascript/tools/jsc/Main.java +++ b/rhino-tools/src/main/java/org/mozilla/javascript/tools/jsc/Main.java @@ -16,7 +16,9 @@ import org.mozilla.javascript.tools.SourceReader; import org.mozilla.javascript.tools.ToolErrorReporter; -/** @author Norris Boyd */ +/** + * @author Norris Boyd + */ public class Main { /** diff --git a/rhino-tools/src/main/java/org/mozilla/javascript/tools/shell/Global.java b/rhino-tools/src/main/java/org/mozilla/javascript/tools/shell/Global.java index 4164d82f2c..6ad4a5d675 100644 --- a/rhino-tools/src/main/java/org/mozilla/javascript/tools/shell/Global.java +++ b/rhino-tools/src/main/java/org/mozilla/javascript/tools/shell/Global.java @@ -303,7 +303,9 @@ public static void defineClass(Context cx, Scriptable thisObj, Object[] args, Fu * @exception InstantiationException if unable to instantiate the named class */ public static void loadClass(Context cx, Scriptable thisObj, Object[] args, Function funObj) - throws IllegalAccessException, InstantiationException, NoSuchMethodException, + throws IllegalAccessException, + InstantiationException, + NoSuchMethodException, InvocationTargetException { Class clazz = getClass(args); if (!Script.class.isAssignableFrom(clazz)) { diff --git a/rhino-tools/src/main/java/org/mozilla/javascript/tools/shell/ShellConsole.java b/rhino-tools/src/main/java/org/mozilla/javascript/tools/shell/ShellConsole.java index 87409ffbfd..022d97787b 100644 --- a/rhino-tools/src/main/java/org/mozilla/javascript/tools/shell/ShellConsole.java +++ b/rhino-tools/src/main/java/org/mozilla/javascript/tools/shell/ShellConsole.java @@ -22,7 +22,9 @@ import org.mozilla.javascript.Scriptable; import org.mozilla.javascript.ScriptableObject; -/** @author André Bargull */ +/** + * @author André Bargull + */ public abstract class ShellConsole { private static final Class[] NO_ARG = {}; @@ -336,7 +338,9 @@ public static ShellConsole getConsole(Scriptable scope, Charset cs) { private static JLineShellConsoleV1 getJLineShellConsoleV1( ClassLoader classLoader, Class readerClass, Scriptable scope, Charset cs) - throws NoSuchMethodException, InstantiationException, IllegalAccessException, + throws NoSuchMethodException, + InstantiationException, + IllegalAccessException, InvocationTargetException { // ConsoleReader reader = new ConsoleReader(); Constructor c = readerClass.getConstructor(); @@ -359,7 +363,9 @@ private static JLineShellConsoleV1 getJLineShellConsoleV1( private static JLineShellConsoleV2 getJLineShellConsoleV2( ClassLoader classLoader, Class readerClass, Scriptable scope, Charset cs) - throws NoSuchMethodException, InstantiationException, IllegalAccessException, + throws NoSuchMethodException, + InstantiationException, + IllegalAccessException, InvocationTargetException { // ConsoleReader reader = new ConsoleReader(); Constructor c = readerClass.getConstructor(); diff --git a/rhino-xml/src/main/java/org/mozilla/javascript/xmlimpl/QName.java b/rhino-xml/src/main/java/org/mozilla/javascript/xmlimpl/QName.java index 41c860ecf1..7bf7ad2b73 100644 --- a/rhino-xml/src/main/java/org/mozilla/javascript/xmlimpl/QName.java +++ b/rhino-xml/src/main/java/org/mozilla/javascript/xmlimpl/QName.java @@ -79,7 +79,9 @@ String uri() { return delegate.getNamespace().getUri(); } - /** @deprecated */ + /** + * @deprecated + */ @Deprecated final XmlNode.QName toNodeQname() { return delegate; diff --git a/rhino-xml/src/main/java/org/mozilla/javascript/xmlimpl/XMLLibImpl.java b/rhino-xml/src/main/java/org/mozilla/javascript/xmlimpl/XMLLibImpl.java index 0670cb3d5c..14f60564e7 100644 --- a/rhino-xml/src/main/java/org/mozilla/javascript/xmlimpl/XMLLibImpl.java +++ b/rhino-xml/src/main/java/org/mozilla/javascript/xmlimpl/XMLLibImpl.java @@ -109,13 +109,17 @@ private XMLLibImpl(Scriptable globalScope) { this.globalScope = globalScope; } - /** @deprecated */ + /** + * @deprecated + */ @Deprecated QName qnamePrototype() { return qnamePrototype; } - /** @deprecated */ + /** + * @deprecated + */ @Deprecated Scriptable globalScope() { return globalScope; @@ -142,7 +146,9 @@ private void exportToScope(boolean sealed) { qnamePrototype.exportAsJSClass(sealed); } - /** @deprecated */ + /** + * @deprecated + */ @Deprecated XMLName toAttributeName(Context cx, Object nameValue) { if (nameValue instanceof XMLName) { diff --git a/rhino-xml/src/main/java/org/mozilla/javascript/xmlimpl/XMLName.java b/rhino-xml/src/main/java/org/mozilla/javascript/xmlimpl/XMLName.java index c4649e4ac1..dc46b1f358 100644 --- a/rhino-xml/src/main/java/org/mozilla/javascript/xmlimpl/XMLName.java +++ b/rhino-xml/src/main/java/org/mozilla/javascript/xmlimpl/XMLName.java @@ -106,7 +106,9 @@ static XMLName formStar() { return rv; } - /** @deprecated */ + /** + * @deprecated + */ @Deprecated static XMLName formProperty(XmlNode.Namespace namespace, String localName) { if (localName != null && localName.equals("*")) localName = null; @@ -149,7 +151,9 @@ static XMLName create(XmlNode.QName qname, boolean attribute, boolean descendant return rv; } - /** @deprecated */ + /** + * @deprecated + */ @Deprecated static XMLName create(XmlNode.QName qname) { return create(qname, false, false); @@ -437,7 +441,9 @@ boolean isDescendants() { } // TODO Fix whether this is an descendant XMLName at construction? - /** @deprecated */ + /** + * @deprecated + */ @Deprecated void setIsDescendants() { // if (isDescendants) throw new IllegalStateException(); diff --git a/rhino-xml/src/main/java/org/mozilla/javascript/xmlimpl/XmlNode.java b/rhino-xml/src/main/java/org/mozilla/javascript/xmlimpl/XmlNode.java index d3c109bd57..f54eaf668a 100644 --- a/rhino-xml/src/main/java/org/mozilla/javascript/xmlimpl/XmlNode.java +++ b/rhino-xml/src/main/java/org/mozilla/javascript/xmlimpl/XmlNode.java @@ -667,7 +667,9 @@ static QName create(Namespace namespace, String localName) { return rv; } - /** @deprecated */ + /** + * @deprecated + */ @Deprecated static QName create(String uri, String localName, String prefix) { return create(Namespace.create(prefix, uri), localName); diff --git a/rhino/src/main/java/org/mozilla/classfile/ClassFileWriter.java b/rhino/src/main/java/org/mozilla/classfile/ClassFileWriter.java index 106d0063c5..0652489195 100644 --- a/rhino/src/main/java/org/mozilla/classfile/ClassFileWriter.java +++ b/rhino/src/main/java/org/mozilla/classfile/ClassFileWriter.java @@ -451,7 +451,7 @@ public void add(int theOpCode, int theOperand) { // generated and Sun's verifier is expecting type state to be // placed even at dead blocks of code. addSuperBlockStart(itsCodeBufferTop + 3); - // fall through... + // fall through... case ByteCode.IFEQ: case ByteCode.IFNE: case ByteCode.IFLT: @@ -1861,7 +1861,7 @@ private int execute(int bci) { case ByteCode.CASTORE: case ByteCode.SASTORE: pop(); - // fall through + // fall through case ByteCode.PUTFIELD: // pop; pop case ByteCode.IF_ICMPEQ: case ByteCode.IF_ICMPNE: @@ -1872,7 +1872,7 @@ private int execute(int bci) { case ByteCode.IF_ACMPEQ: case ByteCode.IF_ACMPNE: pop(); - // fall through + // fall through case ByteCode.IFEQ: // pop case ByteCode.IFNE: case ByteCode.IFLT: @@ -1914,7 +1914,7 @@ private int execute(int bci) { case ByteCode.DCMPL: case ByteCode.DCMPG: pop(); - // fall through + // fall through case ByteCode.INEG: // pop; push(INTEGER) case ByteCode.L2I: case ByteCode.F2I: @@ -1925,7 +1925,7 @@ private int execute(int bci) { case ByteCode.ARRAYLENGTH: case ByteCode.INSTANCEOF: pop(); - // fall through + // fall through case ByteCode.ICONST_M1: // push(INTEGER) case ByteCode.ICONST_0: case ByteCode.ICONST_1: @@ -1955,13 +1955,13 @@ private int execute(int bci) { case ByteCode.LOR: case ByteCode.LXOR: pop(); - // fall through + // fall through case ByteCode.LNEG: // pop; push(LONG) case ByteCode.I2L: case ByteCode.F2L: case ByteCode.D2L: pop(); - // fall through + // fall through case ByteCode.LCONST_0: // push(LONG) case ByteCode.LCONST_1: case ByteCode.LLOAD: @@ -1978,13 +1978,13 @@ private int execute(int bci) { case ByteCode.FDIV: case ByteCode.FREM: pop(); - // fall through + // fall through case ByteCode.FNEG: // pop; push(FLOAT) case ByteCode.I2F: case ByteCode.L2F: case ByteCode.D2F: pop(); - // fall through + // fall through case ByteCode.FCONST_0: // push(FLOAT) case ByteCode.FCONST_1: case ByteCode.FCONST_2: @@ -2002,13 +2002,13 @@ private int execute(int bci) { case ByteCode.DDIV: case ByteCode.DREM: pop(); - // fall through + // fall through case ByteCode.DNEG: // pop; push(DOUBLE) case ByteCode.I2D: case ByteCode.L2D: case ByteCode.F2D: pop(); - // fall through + // fall through case ByteCode.DCONST_0: // push(DOUBLE) case ByteCode.DCONST_1: case ByteCode.DLOAD: @@ -2188,7 +2188,7 @@ private int execute(int bci) { break; case ByteCode.GETFIELD: pop(); - // fall through + // fall through case ByteCode.GETSTATIC: index = getOperand(bci + 1, 2); FieldOrMethodRef f = (FieldOrMethodRef) itsConstantPool.getConstantData(index); @@ -2259,7 +2259,7 @@ private int execute(int bci) { break; case ByteCode.MULTIANEWARRAY: case ByteCode.LOOKUPSWITCH: - // Currently not used in any part of Rhino, so ignore it + // Currently not used in any part of Rhino, so ignore it case ByteCode.JSR: // TODO: JSR is deprecated case ByteCode.RET: case ByteCode.JSR_W: @@ -2855,7 +2855,7 @@ private static int sizeOfParameters(String pString) { case 'J': case 'D': --stackDiff; - // fall through + // fall through case 'B': case 'S': case 'C': @@ -2892,7 +2892,7 @@ private static int sizeOfParameters(String pString) { case 'L': // fall through } - // fall through + // fall through case 'L': { --stackDiff; @@ -2916,7 +2916,7 @@ private static int sizeOfParameters(String pString) { case 'J': case 'D': ++stackDiff; - // fall through + // fall through case 'B': case 'S': case 'C': @@ -2926,7 +2926,7 @@ private static int sizeOfParameters(String pString) { case 'L': case '[': ++stackDiff; - // fall through + // fall through case 'V': break; } diff --git a/rhino/src/main/java/org/mozilla/javascript/BaseFunction.java b/rhino/src/main/java/org/mozilla/javascript/BaseFunction.java index 15698d511d..5e1ad9b932 100644 --- a/rhino/src/main/java/org/mozilla/javascript/BaseFunction.java +++ b/rhino/src/main/java/org/mozilla/javascript/BaseFunction.java @@ -34,7 +34,9 @@ static void init(Context cx, Scriptable scope, boolean sealed) { obj.exportAsJSClass(MAX_PROTOTYPE_ID, scope, sealed); } - /** @deprecated Use {@link #init(Context, Scriptable, boolean)} instead */ + /** + * @deprecated Use {@link #init(Context, Scriptable, boolean)} instead + */ @Deprecated static void init(Scriptable scope, boolean sealed) { init(Context.getContext(), scope, sealed); diff --git a/rhino/src/main/java/org/mozilla/javascript/ClassCache.java b/rhino/src/main/java/org/mozilla/javascript/ClassCache.java index b49f4771ae..c9e326d61e 100644 --- a/rhino/src/main/java/org/mozilla/javascript/ClassCache.java +++ b/rhino/src/main/java/org/mozilla/javascript/ClassCache.java @@ -132,7 +132,9 @@ public synchronized void setCachingEnabled(boolean enabled) { cachingIsEnabled = enabled; } - /** @return a map from classes to associated JavaMembers objects */ + /** + * @return a map from classes to associated JavaMembers objects + */ Map getClassCacheMap() { if (classTable == null) { // Use 1 as concurrency level here and for other concurrent hash maps diff --git a/rhino/src/main/java/org/mozilla/javascript/CodeGenerator.java b/rhino/src/main/java/org/mozilla/javascript/CodeGenerator.java index 7b4867e6d0..aa1e40b8ab 100644 --- a/rhino/src/main/java/org/mozilla/javascript/CodeGenerator.java +++ b/rhino/src/main/java/org/mozilla/javascript/CodeGenerator.java @@ -315,7 +315,7 @@ private void visitStatement(Node node, int initialStackDepth) { case Token.EMPTY: case Token.WITH: updateLineNumber(node); - // fall through + // fall through case Token.SCRIPT: while (child != null) { visitStatement(child, initialStackDepth); @@ -1443,7 +1443,7 @@ private void addVarOp(int op, int varIndex) { addUint8(varIndex); return; } - // fallthrough + // fallthrough case Icode_VAR_INC_DEC: addIndexOp(op, varIndex); return; diff --git a/rhino/src/main/java/org/mozilla/javascript/CompilerEnvirons.java b/rhino/src/main/java/org/mozilla/javascript/CompilerEnvirons.java index f7419a996a..491eb647e5 100644 --- a/rhino/src/main/java/org/mozilla/javascript/CompilerEnvirons.java +++ b/rhino/src/main/java/org/mozilla/javascript/CompilerEnvirons.java @@ -142,7 +142,9 @@ public void setGeneratingSource(boolean generatingSource) { this.generatingSource = generatingSource; } - /** @return true iff code will be generated with callbacks to enable instruction thresholds */ + /** + * @return true iff code will be generated with callbacks to enable instruction thresholds + */ public boolean isGenerateObserverCount() { return generateObserverCount; } diff --git a/rhino/src/main/java/org/mozilla/javascript/Context.java b/rhino/src/main/java/org/mozilla/javascript/Context.java index 686f1808ee..a34a4d3253 100644 --- a/rhino/src/main/java/org/mozilla/javascript/Context.java +++ b/rhino/src/main/java/org/mozilla/javascript/Context.java @@ -160,7 +160,9 @@ public class Context implements Closeable { */ public static final int FEATURE_PARENT_PROTO_PROPERTIES = 5; - /** @deprecated In previous releases, this name was given to FEATURE_PARENT_PROTO_PROPERTIES. */ + /** + * @deprecated In previous releases, this name was given to FEATURE_PARENT_PROTO_PROPERTIES. + */ @Deprecated public static final int FEATURE_PARENT_PROTO_PROPRTIES = 5; /** @@ -952,28 +954,36 @@ static EvaluatorException reportRuntimeErrorById(String messageId, Object... arg return reportRuntimeError(msg); } - /** @deprecated Use {@link #reportRuntimeErrorById(String messageId, Object... args)} instead */ + /** + * @deprecated Use {@link #reportRuntimeErrorById(String messageId, Object... args)} instead + */ @Deprecated static EvaluatorException reportRuntimeError0(String messageId) { String msg = ScriptRuntime.getMessageById(messageId); return reportRuntimeError(msg); } - /** @deprecated Use {@link #reportRuntimeErrorById(String messageId, Object... args)} instead */ + /** + * @deprecated Use {@link #reportRuntimeErrorById(String messageId, Object... args)} instead + */ @Deprecated static EvaluatorException reportRuntimeError1(String messageId, Object arg1) { String msg = ScriptRuntime.getMessageById(messageId, arg1); return reportRuntimeError(msg); } - /** @deprecated Use {@link #reportRuntimeErrorById(String messageId, Object... args)} instead */ + /** + * @deprecated Use {@link #reportRuntimeErrorById(String messageId, Object... args)} instead + */ @Deprecated static EvaluatorException reportRuntimeError2(String messageId, Object arg1, Object arg2) { String msg = ScriptRuntime.getMessageById(messageId, arg1, arg2); return reportRuntimeError(msg); } - /** @deprecated Use {@link #reportRuntimeErrorById(String messageId, Object... args)} instead */ + /** + * @deprecated Use {@link #reportRuntimeErrorById(String messageId, Object... args)} instead + */ @Deprecated static EvaluatorException reportRuntimeError3( String messageId, Object arg1, Object arg2, Object arg3) { @@ -981,7 +991,9 @@ static EvaluatorException reportRuntimeError3( return reportRuntimeError(msg); } - /** @deprecated Use {@link #reportRuntimeErrorById(String messageId, Object... args)} instead */ + /** + * @deprecated Use {@link #reportRuntimeErrorById(String messageId, Object... args)} instead + */ @Deprecated static EvaluatorException reportRuntimeError4( String messageId, Object arg1, Object arg2, Object arg3, Object arg4) { diff --git a/rhino/src/main/java/org/mozilla/javascript/ContextFactory.java b/rhino/src/main/java/org/mozilla/javascript/ContextFactory.java index 6ee0116605..8f5939f47e 100644 --- a/rhino/src/main/java/org/mozilla/javascript/ContextFactory.java +++ b/rhino/src/main/java/org/mozilla/javascript/ContextFactory.java @@ -527,7 +527,9 @@ public final Context enter() { return enterContext(null); } - /** @deprecated Use {@link Context#exit()} instead. */ + /** + * @deprecated Use {@link Context#exit()} instead. + */ @Deprecated public final void exit() { Context.exit(); diff --git a/rhino/src/main/java/org/mozilla/javascript/ContextListener.java b/rhino/src/main/java/org/mozilla/javascript/ContextListener.java index c12d985c64..0862b36228 100644 --- a/rhino/src/main/java/org/mozilla/javascript/ContextListener.java +++ b/rhino/src/main/java/org/mozilla/javascript/ContextListener.java @@ -15,11 +15,15 @@ @Deprecated public interface ContextListener extends ContextFactory.Listener { - /** @deprecated Rhino runtime never calls the method. */ + /** + * @deprecated Rhino runtime never calls the method. + */ @Deprecated public void contextEntered(Context cx); - /** @deprecated Rhino runtime never calls the method. */ + /** + * @deprecated Rhino runtime never calls the method. + */ @Deprecated public void contextExited(Context cx); } diff --git a/rhino/src/main/java/org/mozilla/javascript/ContinuationPending.java b/rhino/src/main/java/org/mozilla/javascript/ContinuationPending.java index f16756089a..7dbec7a6d5 100644 --- a/rhino/src/main/java/org/mozilla/javascript/ContinuationPending.java +++ b/rhino/src/main/java/org/mozilla/javascript/ContinuationPending.java @@ -53,7 +53,9 @@ public void setContinuation(NativeContinuation continuation) { this.continuationState = continuation; } - /** @return internal continuation state */ + /** + * @return internal continuation state + */ NativeContinuation getContinuationState() { return continuationState; } @@ -68,7 +70,9 @@ public void setApplicationState(Object applicationState) { this.applicationState = applicationState; } - /** @return arbitrary application state */ + /** + * @return arbitrary application state + */ public Object getApplicationState() { return applicationState; } diff --git a/rhino/src/main/java/org/mozilla/javascript/DToA.java b/rhino/src/main/java/org/mozilla/javascript/DToA.java index 3b968d9843..af291dd79a 100644 --- a/rhino/src/main/java/org/mozilla/javascript/DToA.java +++ b/rhino/src/main/java/org/mozilla/javascript/DToA.java @@ -567,14 +567,14 @@ static int JS_dtoa( break; case 2: leftright = false; - /* fall through */ + /* fall through */ case 4: if (ndigits <= 0) ndigits = 1; ilim = ilim1 = i = ndigits; break; case 3: leftright = false; - /* fall through */ + /* fall through */ case 5: i = ndigits + k + 1; ilim = i; @@ -1095,7 +1095,7 @@ static void JS_dtostr(StringBuilder buffer, int mode, int precision, double d) { case DTOSTR_EXPONENTIAL: // JS_ASSERT(precision > 0); minNDigits = precision; - /* fall through */ + /* fall through */ case DTOSTR_STANDARD_EXPONENTIAL: exponentialNotation = true; break; diff --git a/rhino/src/main/java/org/mozilla/javascript/Delegator.java b/rhino/src/main/java/org/mozilla/javascript/Delegator.java index ebb8d8a13d..748c00b46a 100644 --- a/rhino/src/main/java/org/mozilla/javascript/Delegator.java +++ b/rhino/src/main/java/org/mozilla/javascript/Delegator.java @@ -74,13 +74,17 @@ public void setDelegee(Scriptable obj) { this.obj = obj; } - /** @see org.mozilla.javascript.Scriptable#getClassName */ + /** + * @see org.mozilla.javascript.Scriptable#getClassName + */ @Override public String getClassName() { return getDelegee().getClassName(); } - /** @see org.mozilla.javascript.Scriptable#get(String, Scriptable) */ + /** + * @see org.mozilla.javascript.Scriptable#get(String, Scriptable) + */ @Override public Object get(String name, Scriptable start) { return getDelegee().get(name, start); @@ -95,13 +99,17 @@ public Object get(Symbol key, Scriptable start) { return Scriptable.NOT_FOUND; } - /** @see org.mozilla.javascript.Scriptable#get(int, Scriptable) */ + /** + * @see org.mozilla.javascript.Scriptable#get(int, Scriptable) + */ @Override public Object get(int index, Scriptable start) { return getDelegee().get(index, start); } - /** @see org.mozilla.javascript.Scriptable#has(String, Scriptable) */ + /** + * @see org.mozilla.javascript.Scriptable#has(String, Scriptable) + */ @Override public boolean has(String name, Scriptable start) { return getDelegee().has(name, start); @@ -116,19 +124,25 @@ public boolean has(Symbol key, Scriptable start) { return false; } - /** @see org.mozilla.javascript.Scriptable#has(int, Scriptable) */ + /** + * @see org.mozilla.javascript.Scriptable#has(int, Scriptable) + */ @Override public boolean has(int index, Scriptable start) { return getDelegee().has(index, start); } - /** @see org.mozilla.javascript.Scriptable#put(String, Scriptable, Object) */ + /** + * @see org.mozilla.javascript.Scriptable#put(String, Scriptable, Object) + */ @Override public void put(String name, Scriptable start, Object value) { getDelegee().put(name, start, value); } - /** @see org.mozilla.javascript.SymbolScriptable#put(Symbol, Scriptable, Object) */ + /** + * @see org.mozilla.javascript.SymbolScriptable#put(Symbol, Scriptable, Object) + */ @Override public void put(Symbol symbol, Scriptable start, Object value) { final Scriptable delegee = getDelegee(); @@ -137,13 +151,17 @@ public void put(Symbol symbol, Scriptable start, Object value) { } } - /** @see org.mozilla.javascript.Scriptable#put(int, Scriptable, Object) */ + /** + * @see org.mozilla.javascript.Scriptable#put(int, Scriptable, Object) + */ @Override public void put(int index, Scriptable start, Object value) { getDelegee().put(index, start, value); } - /** @see org.mozilla.javascript.Scriptable#delete(String) */ + /** + * @see org.mozilla.javascript.Scriptable#delete(String) + */ @Override public void delete(String name) { getDelegee().delete(name); @@ -157,37 +175,49 @@ public void delete(Symbol key) { } } - /** @see org.mozilla.javascript.Scriptable#delete(int) */ + /** + * @see org.mozilla.javascript.Scriptable#delete(int) + */ @Override public void delete(int index) { getDelegee().delete(index); } - /** @see org.mozilla.javascript.Scriptable#getPrototype */ + /** + * @see org.mozilla.javascript.Scriptable#getPrototype + */ @Override public Scriptable getPrototype() { return getDelegee().getPrototype(); } - /** @see org.mozilla.javascript.Scriptable#setPrototype */ + /** + * @see org.mozilla.javascript.Scriptable#setPrototype + */ @Override public void setPrototype(Scriptable prototype) { getDelegee().setPrototype(prototype); } - /** @see org.mozilla.javascript.Scriptable#getParentScope */ + /** + * @see org.mozilla.javascript.Scriptable#getParentScope + */ @Override public Scriptable getParentScope() { return getDelegee().getParentScope(); } - /** @see org.mozilla.javascript.Scriptable#setParentScope */ + /** + * @see org.mozilla.javascript.Scriptable#setParentScope + */ @Override public void setParentScope(Scriptable parent) { getDelegee().setParentScope(parent); } - /** @see org.mozilla.javascript.Scriptable#getIds */ + /** + * @see org.mozilla.javascript.Scriptable#getIds + */ @Override public Object[] getIds() { return getDelegee().getIds(); @@ -211,13 +241,17 @@ public Object getDefaultValue(Class hint) { : getDelegee().getDefaultValue(hint); } - /** @see org.mozilla.javascript.Scriptable#hasInstance */ + /** + * @see org.mozilla.javascript.Scriptable#hasInstance + */ @Override public boolean hasInstance(Scriptable instance) { return getDelegee().hasInstance(instance); } - /** @see org.mozilla.javascript.Function#call */ + /** + * @see org.mozilla.javascript.Function#call + */ @Override public Object call(Context cx, Scriptable scope, Scriptable thisObj, Object[] args) { return ((Function) getDelegee()).call(cx, scope, thisObj, args); diff --git a/rhino/src/main/java/org/mozilla/javascript/EcmaError.java b/rhino/src/main/java/org/mozilla/javascript/EcmaError.java index 6565f7b8d7..910f4033d5 100644 --- a/rhino/src/main/java/org/mozilla/javascript/EcmaError.java +++ b/rhino/src/main/java/org/mozilla/javascript/EcmaError.java @@ -90,31 +90,41 @@ public String getErrorMessage() { return errorMessage; } - /** @deprecated Use {@link RhinoException#sourceName()} from the super class. */ + /** + * @deprecated Use {@link RhinoException#sourceName()} from the super class. + */ @Deprecated public String getSourceName() { return sourceName(); } - /** @deprecated Use {@link RhinoException#lineNumber()} from the super class. */ + /** + * @deprecated Use {@link RhinoException#lineNumber()} from the super class. + */ @Deprecated public int getLineNumber() { return lineNumber(); } - /** @deprecated Use {@link RhinoException#columnNumber()} from the super class. */ + /** + * @deprecated Use {@link RhinoException#columnNumber()} from the super class. + */ @Deprecated public int getColumnNumber() { return columnNumber(); } - /** @deprecated Use {@link RhinoException#lineSource()} from the super class. */ + /** + * @deprecated Use {@link RhinoException#lineSource()} from the super class. + */ @Deprecated public String getLineSource() { return lineSource(); } - /** @deprecated Always returns null. */ + /** + * @deprecated Always returns null. + */ @Deprecated public Scriptable getErrorObject() { return null; diff --git a/rhino/src/main/java/org/mozilla/javascript/EvaluatorException.java b/rhino/src/main/java/org/mozilla/javascript/EvaluatorException.java index 1ab543734c..b03747aad0 100644 --- a/rhino/src/main/java/org/mozilla/javascript/EvaluatorException.java +++ b/rhino/src/main/java/org/mozilla/javascript/EvaluatorException.java @@ -44,25 +44,33 @@ public EvaluatorException( recordErrorOrigin(sourceName, lineNumber, lineSource, columnNumber); } - /** @deprecated Use {@link RhinoException#sourceName()} from the super class. */ + /** + * @deprecated Use {@link RhinoException#sourceName()} from the super class. + */ @Deprecated public String getSourceName() { return sourceName(); } - /** @deprecated Use {@link RhinoException#lineNumber()} from the super class. */ + /** + * @deprecated Use {@link RhinoException#lineNumber()} from the super class. + */ @Deprecated public int getLineNumber() { return lineNumber(); } - /** @deprecated Use {@link RhinoException#columnNumber()} from the super class. */ + /** + * @deprecated Use {@link RhinoException#columnNumber()} from the super class. + */ @Deprecated public int getColumnNumber() { return columnNumber(); } - /** @deprecated Use {@link RhinoException#lineSource()} from the super class. */ + /** + * @deprecated Use {@link RhinoException#lineSource()} from the super class. + */ @Deprecated public String getLineSource() { return lineSource(); diff --git a/rhino/src/main/java/org/mozilla/javascript/ImporterTopLevel.java b/rhino/src/main/java/org/mozilla/javascript/ImporterTopLevel.java index 458f41a1df..2a28f116cb 100644 --- a/rhino/src/main/java/org/mozilla/javascript/ImporterTopLevel.java +++ b/rhino/src/main/java/org/mozilla/javascript/ImporterTopLevel.java @@ -142,7 +142,9 @@ private static Object[] getNativeJavaPackages(Scriptable scope) { return null; } - /** @deprecated Kept only for compatibility. */ + /** + * @deprecated Kept only for compatibility. + */ @Deprecated public void importPackage(Context cx, Scriptable thisObj, Object[] args, Function funObj) { js_importPackage(this, args); diff --git a/rhino/src/main/java/org/mozilla/javascript/Interpreter.java b/rhino/src/main/java/org/mozilla/javascript/Interpreter.java index 7e0f6f74c0..3d36080744 100644 --- a/rhino/src/main/java/org/mozilla/javascript/Interpreter.java +++ b/rhino/src/main/java/org/mozilla/javascript/Interpreter.java @@ -723,7 +723,7 @@ static void dumpICode(InterpreterData idata) { out.println(tname + " " + indexReg); ++pc; break; - // TODO: Icode_REG_STR_C0-3 is not dump. I made this the same it. + // TODO: Icode_REG_STR_C0-3 is not dump. I made this the same it. case Icode_REG_BIGINT_C0: case Icode_REG_BIGINT_C1: case Icode_REG_BIGINT_C2: @@ -1288,7 +1288,7 @@ private static Object interpretLoop(Context cx, CallFrame frame, Object throwabl } // We are now resuming execution. Fall through to YIELD case. } - // fall through... + // fall through... case Token.YIELD: case Icode_YIELD_STAR: { @@ -2098,7 +2098,7 @@ private static Object interpretLoop(Context cx, CallFrame frame, Object throwabl continue Loop; case Icode_SETCONSTVAR1: indexReg = iCode[frame.pc++]; - // fallthrough + // fallthrough case Token.SETCONSTVAR: stackTop = doSetConstVar( @@ -2113,7 +2113,7 @@ private static Object interpretLoop(Context cx, CallFrame frame, Object throwabl continue Loop; case Icode_SETVAR1: indexReg = iCode[frame.pc++]; - // fallthrough + // fallthrough case Token.SETVAR: stackTop = doSetVar( @@ -2128,7 +2128,7 @@ private static Object interpretLoop(Context cx, CallFrame frame, Object throwabl continue Loop; case Icode_GETVAR1: indexReg = iCode[frame.pc++]; - // fallthrough + // fallthrough case Token.GETVAR: stackTop = doGetVar( diff --git a/rhino/src/main/java/org/mozilla/javascript/JavaScriptException.java b/rhino/src/main/java/org/mozilla/javascript/JavaScriptException.java index 133675f35c..3b9792c66c 100644 --- a/rhino/src/main/java/org/mozilla/javascript/JavaScriptException.java +++ b/rhino/src/main/java/org/mozilla/javascript/JavaScriptException.java @@ -90,18 +90,24 @@ public String getDetails() { } } - /** @return the value wrapped by this exception */ + /** + * @return the value wrapped by this exception + */ public Object getValue() { return value; } - /** @deprecated Use {@link RhinoException#sourceName()} from the super class. */ + /** + * @deprecated Use {@link RhinoException#sourceName()} from the super class. + */ @Deprecated public String getSourceName() { return sourceName(); } - /** @deprecated Use {@link RhinoException#lineNumber()} from the super class. */ + /** + * @deprecated Use {@link RhinoException#lineNumber()} from the super class. + */ @Deprecated public int getLineNumber() { return lineNumber(); diff --git a/rhino/src/main/java/org/mozilla/javascript/NativeArray.java b/rhino/src/main/java/org/mozilla/javascript/NativeArray.java index d0276715d7..5fef780200 100644 --- a/rhino/src/main/java/org/mozilla/javascript/NativeArray.java +++ b/rhino/src/main/java/org/mozilla/javascript/NativeArray.java @@ -1013,7 +1013,9 @@ public long getLength() { return length; } - /** @deprecated Use {@link #getLength()} instead. */ + /** + * @deprecated Use {@link #getLength()} instead. + */ @Deprecated public long jsGet_length() { return getLength(); diff --git a/rhino/src/main/java/org/mozilla/javascript/NativeConsole.java b/rhino/src/main/java/org/mozilla/javascript/NativeConsole.java index 65615ffb78..59838c4bb8 100644 --- a/rhino/src/main/java/org/mozilla/javascript/NativeConsole.java +++ b/rhino/src/main/java/org/mozilla/javascript/NativeConsole.java @@ -249,8 +249,8 @@ public static String format(Context cx, Scriptable scope, Object[] args) { replaceArg = formatObj(cx, scope, val); break; - // %c is not supported, - // simply removed from the output + // %c is not supported, + // simply removed from the output default: replaceArg = ""; diff --git a/rhino/src/main/java/org/mozilla/javascript/NativeDate.java b/rhino/src/main/java/org/mozilla/javascript/NativeDate.java index dc7601510c..983a3e1cf9 100644 --- a/rhino/src/main/java/org/mozilla/javascript/NativeDate.java +++ b/rhino/src/main/java/org/mozilla/javascript/NativeDate.java @@ -1583,28 +1583,28 @@ private static double makeTime(Context cx, double date, Object[] args, int metho switch (methodId) { case Id_setUTCMilliseconds: local = false; - // fallthrough + // fallthrough case Id_setMilliseconds: maxargs = 1; break; case Id_setUTCSeconds: local = false; - // fallthrough + // fallthrough case Id_setSeconds: maxargs = 2; break; case Id_setUTCMinutes: local = false; - // fallthrough + // fallthrough case Id_setMinutes: maxargs = 3; break; case Id_setUTCHours: local = false; - // fallthrough + // fallthrough case Id_setHours: maxargs = 4; break; @@ -1670,21 +1670,21 @@ private static double makeDate(Context cx, double date, Object[] args, int metho switch (methodId) { case Id_setUTCDate: local = false; - // fallthrough + // fallthrough case Id_setDate: maxargs = 1; break; case Id_setUTCMonth: local = false; - // fallthrough + // fallthrough case Id_setMonth: maxargs = 2; break; case Id_setUTCFullYear: local = false; - // fallthrough + // fallthrough case Id_setFullYear: maxargs = 3; break; diff --git a/rhino/src/main/java/org/mozilla/javascript/NativeGlobal.java b/rhino/src/main/java/org/mozilla/javascript/NativeGlobal.java index b672569186..dfd9a23bd1 100644 --- a/rhino/src/main/java/org/mozilla/javascript/NativeGlobal.java +++ b/rhino/src/main/java/org/mozilla/javascript/NativeGlobal.java @@ -503,7 +503,9 @@ static boolean isEvalFunction(Object functionObj) { return false; } - /** @deprecated Use {@link ScriptRuntime#constructError(String,String)} instead. */ + /** + * @deprecated Use {@link ScriptRuntime#constructError(String,String)} instead. + */ @Deprecated public static EcmaError constructError( Context cx, String error, String message, Scriptable scope) { diff --git a/rhino/src/main/java/org/mozilla/javascript/NativeJavaPackage.java b/rhino/src/main/java/org/mozilla/javascript/NativeJavaPackage.java index bab121e16d..6921e18187 100644 --- a/rhino/src/main/java/org/mozilla/javascript/NativeJavaPackage.java +++ b/rhino/src/main/java/org/mozilla/javascript/NativeJavaPackage.java @@ -30,13 +30,17 @@ public class NativeJavaPackage extends ScriptableObject { this.classLoader = classLoader; } - /** @deprecated NativeJavaPackage is an internal class, do not use it directly. */ + /** + * @deprecated NativeJavaPackage is an internal class, do not use it directly. + */ @Deprecated public NativeJavaPackage(String packageName, ClassLoader classLoader) { this(false, packageName, classLoader); } - /** @deprecated NativeJavaPackage is an internal class, do not use it directly. */ + /** + * @deprecated NativeJavaPackage is an internal class, do not use it directly. + */ @Deprecated public NativeJavaPackage(String packageName) { this(false, packageName, Context.getCurrentContext().getApplicationClassLoader()); diff --git a/rhino/src/main/java/org/mozilla/javascript/NativeNumber.java b/rhino/src/main/java/org/mozilla/javascript/NativeNumber.java index 63f730d617..2a932dd6a1 100644 --- a/rhino/src/main/java/org/mozilla/javascript/NativeNumber.java +++ b/rhino/src/main/java/org/mozilla/javascript/NativeNumber.java @@ -16,7 +16,9 @@ final class NativeNumber extends IdScriptableObject { private static final long serialVersionUID = 3504516769741512101L; - /** @see https://www.ecma-international.org/ecma-262/6.0/#sec-number.max_safe_integer */ + /** + * @see https://www.ecma-international.org/ecma-262/6.0/#sec-number.max_safe_integer + */ public static final double MAX_SAFE_INTEGER = 9007199254740991.0; // Math.pow(2, 53) - 1 private static final Object NUMBER_TAG = "Number"; diff --git a/rhino/src/main/java/org/mozilla/javascript/NativeScript.java b/rhino/src/main/java/org/mozilla/javascript/NativeScript.java index bef736d0da..1084010290 100644 --- a/rhino/src/main/java/org/mozilla/javascript/NativeScript.java +++ b/rhino/src/main/java/org/mozilla/javascript/NativeScript.java @@ -30,7 +30,9 @@ static void init(Context cx, Scriptable scope, boolean sealed) { obj.exportAsJSClass(MAX_PROTOTYPE_ID, scope, sealed); } - /** @deprecated Use {@link #init(Context, Scriptable, boolean)} instead */ + /** + * @deprecated Use {@link #init(Context, Scriptable, boolean)} instead + */ @Deprecated static void init(Scriptable scope, boolean sealed) { init(Context.getContext(), scope, sealed); diff --git a/rhino/src/main/java/org/mozilla/javascript/NativeString.java b/rhino/src/main/java/org/mozilla/javascript/NativeString.java index 6f174b19b0..03efcc0d9d 100644 --- a/rhino/src/main/java/org/mozilla/javascript/NativeString.java +++ b/rhino/src/main/java/org/mozilla/javascript/NativeString.java @@ -505,7 +505,7 @@ public Object execIdCall( if (id == Id_endsWith) { return Boolean.valueOf(idx != -1); } - // fallthrough + // fallthrough case Id_padStart: case Id_padEnd: @@ -641,7 +641,7 @@ public Object execIdCall( return ScriptRuntime.checkRegExpProxy(cx) .action(cx, scope, thisObj, args, actionType); } - // ECMA-262 1 5.5.4.9 + // ECMA-262 1 5.5.4.9 case Id_localeCompare: { // For now, create and configure a collator instance. I can't diff --git a/rhino/src/main/java/org/mozilla/javascript/NodeTransformer.java b/rhino/src/main/java/org/mozilla/javascript/NodeTransformer.java index 67a8d3a777..18e0feb331 100644 --- a/rhino/src/main/java/org/mozilla/javascript/NodeTransformer.java +++ b/rhino/src/main/java/org/mozilla/javascript/NodeTransformer.java @@ -270,7 +270,7 @@ private void transformCompilationUnit_r( } // fall through to process let declaration... } - /* fall through */ + /* fall through */ case Token.CONST: case Token.VAR: { @@ -355,7 +355,7 @@ private void transformCompilationUnit_r( } } } - /* fall through */ + /* fall through */ case Token.NAME: case Token.SETCONST: case Token.DELPROP: diff --git a/rhino/src/main/java/org/mozilla/javascript/Parser.java b/rhino/src/main/java/org/mozilla/javascript/Parser.java index cb13ad6c0f..aa87884228 100644 --- a/rhino/src/main/java/org/mozilla/javascript/Parser.java +++ b/rhino/src/main/java/org/mozilla/javascript/Parser.java @@ -2036,7 +2036,7 @@ private AstNode returnOrYield(int tt, boolean exprContext) throws IOException { // Take extra care to preserve language compatibility break; } - // fallthrough + // fallthrough default: e = expr(false); end = getNodeEnd(e); @@ -2589,7 +2589,7 @@ private AstNode relExpr() throws IOException { switch (tt) { case Token.IN: if (inForInit) break; - // fall through + // fall through case Token.INSTANCEOF: case Token.LE: case Token.LT: @@ -2729,8 +2729,8 @@ private AstNode unaryExpr() throws IOException { consumeToken(); return memberExprTail(true, xmlInitializer()); } - // Fall thru to the default handling of RELOP - // fall through + // Fall thru to the default handling of RELOP + // fall through default: AstNode pn = memberExpr(true); @@ -3089,16 +3089,16 @@ private AstNode attributeAccess() throws IOException { int tt = nextToken(), atPos = ts.tokenBeg; switch (tt) { - // handles: @name, @ns::name, @ns::*, @ns::[expr] + // handles: @name, @ns::name, @ns::*, @ns::[expr] case Token.NAME: return propertyName(atPos, 0); - // handles: @*, @*::name, @*::*, @*::[expr] + // handles: @*, @*::name, @*::*, @*::[expr] case Token.MUL: saveNameTokenData(ts.tokenBeg, "*", ts.lineno); return propertyName(atPos, 0); - // handles @[expr] + // handles @[expr] case Token.LB: return xmlElemRef(atPos, null, -1); @@ -3128,18 +3128,18 @@ private AstNode propertyName(int atPos, int memberTypeFlags) throws IOException colonPos = ts.tokenBeg; switch (nextToken()) { - // handles name::name + // handles name::name case Token.NAME: name = createNameNode(); break; - // handles name::* + // handles name::* case Token.MUL: saveNameTokenData(ts.tokenBeg, "*", ts.lineno); name = createNameNode(false, -1); break; - // handles name::[expr] or *::[expr] + // handles name::[expr] or *::[expr] case Token.LB: return xmlElemRef(atPos, ns, colonPos); @@ -3500,7 +3500,7 @@ private ArrayComprehensionLoop arrayComprehensionLoop() throws IOException { isForOf = true; break; } - // fall through + // fall through default: reportError("msg.in.after.for.name"); } diff --git a/rhino/src/main/java/org/mozilla/javascript/Ref.java b/rhino/src/main/java/org/mozilla/javascript/Ref.java index a4e7544359..2d8e56b6cd 100644 --- a/rhino/src/main/java/org/mozilla/javascript/Ref.java +++ b/rhino/src/main/java/org/mozilla/javascript/Ref.java @@ -22,7 +22,9 @@ public boolean has(Context cx) { public abstract Object get(Context cx); - /** @deprecated Use {@link #set(Context, Scriptable, Object)} instead */ + /** + * @deprecated Use {@link #set(Context, Scriptable, Object)} instead + */ @Deprecated public abstract Object set(Context cx, Object value); diff --git a/rhino/src/main/java/org/mozilla/javascript/ScriptRuntime.java b/rhino/src/main/java/org/mozilla/javascript/ScriptRuntime.java index 337f7e0bba..b6577eddfe 100644 --- a/rhino/src/main/java/org/mozilla/javascript/ScriptRuntime.java +++ b/rhino/src/main/java/org/mozilla/javascript/ScriptRuntime.java @@ -577,7 +577,7 @@ private static double stringToNumber( if (bit) { state = MIXED_AFTER_54; } - // fallthrough + // fallthrough case MIXED_AFTER_54: factor *= 2; break; @@ -1223,7 +1223,9 @@ public static Scriptable toObjectOrNull(Context cx, Object obj) { return null; } - /** @param scope the scope that should be used to resolve primitive prototype */ + /** + * @param scope the scope that should be used to resolve primitive prototype + */ public static Scriptable toObjectOrNull(Context cx, Object obj, Scriptable scope) { if (obj instanceof Scriptable) { return (Scriptable) obj; @@ -1233,7 +1235,9 @@ public static Scriptable toObjectOrNull(Context cx, Object obj, Scriptable scope return null; } - /** @deprecated Use {@link #toObject(Scriptable, Object)} instead. */ + /** + * @deprecated Use {@link #toObject(Scriptable, Object)} instead. + */ @Deprecated public static Scriptable toObject(Scriptable scope, Object val, Class staticClass) { if (val instanceof Scriptable) { @@ -1297,14 +1301,18 @@ public static Scriptable toObject(Context cx, Scriptable scope, Object val) { throw errorWithClassName("msg.invalid.type", val); } - /** @deprecated Use {@link #toObject(Context, Scriptable, Object)} instead. */ + /** + * @deprecated Use {@link #toObject(Context, Scriptable, Object)} instead. + */ @Deprecated public static Scriptable toObject( Context cx, Scriptable scope, Object val, Class staticClass) { return toObject(cx, scope, val); } - /** @deprecated The method is only present for compatibility. */ + /** + * @deprecated The method is only present for compatibility. + */ @Deprecated public static Object call( Context cx, Object fun, Object thisArg, Object[] args, Scriptable scope) { @@ -1753,7 +1761,9 @@ public static Object getObjectProp(Scriptable obj, String property, Context cx) return result; } - /** @deprecated Use {@link #getObjectPropNoWarn(Object, String, Context, Scriptable)} instead */ + /** + * @deprecated Use {@link #getObjectPropNoWarn(Object, String, Context, Scriptable)} instead + */ @Deprecated public static Object getObjectPropNoWarn(Object obj, String property, Context cx) { return getObjectPropNoWarn(obj, property, cx, getTopCallScope(cx)); @@ -1943,7 +1953,9 @@ public static Object refGet(Ref ref, Context cx) { return ref.get(cx); } - /** @deprecated Use {@link #refSet(Ref, Object, Context, Scriptable)} instead */ + /** + * @deprecated Use {@link #refSet(Ref, Object, Context, Scriptable)} instead + */ @Deprecated public static Object refSet(Ref ref, Object value, Context cx) { return refSet(ref, value, cx, getTopCallScope(cx)); @@ -1961,7 +1973,9 @@ static boolean isSpecialProperty(String s) { return s.equals("__proto__") || s.equals("__parent__"); } - /** @deprecated Use {@link #specialRef(Object, String, Context, Scriptable)} instead */ + /** + * @deprecated Use {@link #specialRef(Object, String, Context, Scriptable)} instead + */ @Deprecated public static Ref specialRef(Object obj, String specialProperty, Context cx) { return specialRef(obj, specialProperty, cx, getTopCallScope(cx)); @@ -1971,7 +1985,9 @@ public static Ref specialRef(Object obj, String specialProperty, Context cx, Scr return SpecialRef.createSpecial(cx, scope, obj, specialProperty); } - /** @deprecated Use {@link #delete(Object, Object, Context, Scriptable, boolean)} instead */ + /** + * @deprecated Use {@link #delete(Object, Object, Context, Scriptable, boolean)} instead + */ @Deprecated public static Object delete(Object obj, Object id, Context cx) { return delete(obj, id, cx, false); @@ -2296,7 +2312,9 @@ public static Object enumInit(Object value, Context cx, boolean enumValues) { public static final int ENUMERATE_ARRAY_NO_ITERATOR = 5; public static final int ENUMERATE_VALUES_IN_ORDER = 6; - /** @deprecated Use {@link #enumInit(Object, Context, Scriptable, int)} instead */ + /** + * @deprecated Use {@link #enumInit(Object, Context, Scriptable, int)} instead + */ @Deprecated public static Object enumInit(Object value, Context cx, int enumType) { return enumInit(value, cx, getTopCallScope(cx), enumType); @@ -2362,7 +2380,9 @@ public static void setEnumNumbers(Object enumObj, boolean enumNumbers) { ((IdEnumeration) enumObj).enumNumbers = enumNumbers; } - /** @deprecated since 1.7.15. Use {@link #enumNext(Object, Context)} instead */ + /** + * @deprecated since 1.7.15. Use {@link #enumNext(Object, Context)} instead + */ @Deprecated public static Boolean enumNext(Object enumObj) { return enumNext(enumObj, Context.getContext()); @@ -2845,7 +2865,9 @@ static Scriptable getApplyOrCallThis(Context cx, Scriptable scope, Object arg0, return callThis; } - /** @return true if the passed in Scriptable looks like an array */ + /** + * @return true if the passed in Scriptable looks like an array + */ private static boolean isArrayLike(Scriptable obj) { return obj != null && (obj instanceof NativeArray @@ -3292,7 +3314,9 @@ public static Object nameIncrDecr( return doScriptableIncrDecr(target, id, scopeChain, value, incrDecrMask); } - /** @deprecated Use {@link #propIncrDecr(Object, String, Context, Scriptable, int)} instead */ + /** + * @deprecated Use {@link #propIncrDecr(Object, String, Context, Scriptable, int)} instead + */ @Deprecated public static Object propIncrDecr(Object obj, String id, Context cx, int incrDecrMask) { return propIncrDecr(obj, id, cx, getTopCallScope(cx), incrDecrMask); @@ -3365,7 +3389,9 @@ private static Object doScriptableIncrDecr( return result; } - /** @deprecated Use {@link #elemIncrDecr(Object, Object, Context, Scriptable, int)} instead */ + /** + * @deprecated Use {@link #elemIncrDecr(Object, Object, Context, Scriptable, int)} instead + */ @Deprecated public static Object elemIncrDecr(Object obj, Object index, Context cx, int incrDecrMask) { return elemIncrDecr(obj, index, cx, getTopCallScope(cx), incrDecrMask); @@ -3411,7 +3437,9 @@ public static Object elemIncrDecr( return result; } - /** @deprecated Use {@link #refIncrDecr(Ref, Context, Scriptable, int)} instead */ + /** + * @deprecated Use {@link #refIncrDecr(Ref, Context, Scriptable, int)} instead + */ @Deprecated public static Object refIncrDecr(Ref ref, Context cx, int incrDecrMask) { return refIncrDecr(ref, cx, getTopCallScope(cx), incrDecrMask); @@ -4655,34 +4683,44 @@ static void checkDeprecated(Context cx, String name) { } } - /** @deprecated Use {@link #getMessageById(String messageId, Object... args)} instead */ + /** + * @deprecated Use {@link #getMessageById(String messageId, Object... args)} instead + */ @Deprecated public static String getMessage0(String messageId) { return getMessage(messageId, null); } - /** @deprecated Use {@link #getMessageById(String messageId, Object... args)} instead */ + /** + * @deprecated Use {@link #getMessageById(String messageId, Object... args)} instead + */ @Deprecated public static String getMessage1(String messageId, Object arg1) { Object[] arguments = {arg1}; return getMessage(messageId, arguments); } - /** @deprecated Use {@link #getMessageById(String messageId, Object... args)} instead */ + /** + * @deprecated Use {@link #getMessageById(String messageId, Object... args)} instead + */ @Deprecated public static String getMessage2(String messageId, Object arg1, Object arg2) { Object[] arguments = {arg1, arg2}; return getMessage(messageId, arguments); } - /** @deprecated Use {@link #getMessageById(String messageId, Object... args)} instead */ + /** + * @deprecated Use {@link #getMessageById(String messageId, Object... args)} instead + */ @Deprecated public static String getMessage3(String messageId, Object arg1, Object arg2, Object arg3) { Object[] arguments = {arg1, arg2, arg3}; return getMessage(messageId, arguments); } - /** @deprecated Use {@link #getMessageById(String messageId, Object... args)} instead */ + /** + * @deprecated Use {@link #getMessageById(String messageId, Object... args)} instead + */ @Deprecated public static String getMessage4( String messageId, Object arg1, Object arg2, Object arg3, Object arg4) { @@ -4710,7 +4748,9 @@ public interface MessageProvider { public static final MessageProvider messageProvider = new DefaultMessageProvider(); - /** @deprecated Use {@link #getMessageById(String messageId, Object... args)} instead */ + /** + * @deprecated Use {@link #getMessageById(String messageId, Object... args)} instead + */ @Deprecated public static String getMessage(String messageId, Object[] arguments) { return messageProvider.getMessage(messageId, arguments); @@ -4796,28 +4836,36 @@ public static EcmaError typeErrorById(String messageId, Object... args) { return typeError(msg); } - /** @deprecated Use {@link #typeErrorById(String messageId, Object... args)} instead */ + /** + * @deprecated Use {@link #typeErrorById(String messageId, Object... args)} instead + */ @Deprecated public static EcmaError typeError0(String messageId) { String msg = getMessage0(messageId); return typeError(msg); } - /** @deprecated Use {@link #typeErrorById(String messageId, Object... args)} instead */ + /** + * @deprecated Use {@link #typeErrorById(String messageId, Object... args)} instead + */ @Deprecated public static EcmaError typeError1(String messageId, Object arg1) { String msg = getMessage1(messageId, arg1); return typeError(msg); } - /** @deprecated Use {@link #typeErrorById(String messageId, Object... args)} instead */ + /** + * @deprecated Use {@link #typeErrorById(String messageId, Object... args)} instead + */ @Deprecated public static EcmaError typeError2(String messageId, Object arg1, Object arg2) { String msg = getMessage2(messageId, arg1, arg2); return typeError(msg); } - /** @deprecated Use {@link #typeErrorById(String messageId, Object... args)} instead */ + /** + * @deprecated Use {@link #typeErrorById(String messageId, Object... args)} instead + */ @Deprecated public static EcmaError typeError3(String messageId, String arg1, String arg2, String arg3) { String msg = getMessage3(messageId, arg1, arg2, arg3); diff --git a/rhino/src/main/java/org/mozilla/javascript/SecureCaller.java b/rhino/src/main/java/org/mozilla/javascript/SecureCaller.java index e05335189c..8121e72a8f 100644 --- a/rhino/src/main/java/org/mozilla/javascript/SecureCaller.java +++ b/rhino/src/main/java/org/mozilla/javascript/SecureCaller.java @@ -19,7 +19,9 @@ import java.util.Map; import java.util.WeakHashMap; -/** @author Attila Szegedi */ +/** + * @author Attila Szegedi + */ public abstract class SecureCaller { private static final byte[] secureCallerImplBytecode = loadBytecode(); diff --git a/rhino/src/main/java/org/mozilla/javascript/SecurityUtilities.java b/rhino/src/main/java/org/mozilla/javascript/SecurityUtilities.java index c9e46c79d9..6b024af6e6 100644 --- a/rhino/src/main/java/org/mozilla/javascript/SecurityUtilities.java +++ b/rhino/src/main/java/org/mozilla/javascript/SecurityUtilities.java @@ -10,7 +10,9 @@ import java.security.PrivilegedAction; import java.security.ProtectionDomain; -/** @author Attila Szegedi */ +/** + * @author Attila Szegedi + */ public class SecurityUtilities { /** * Retrieves a system property within a privileged block. Use it only when the property is used diff --git a/rhino/src/main/java/org/mozilla/javascript/Synchronizer.java b/rhino/src/main/java/org/mozilla/javascript/Synchronizer.java index 2819ca762a..f708ca3fb1 100644 --- a/rhino/src/main/java/org/mozilla/javascript/Synchronizer.java +++ b/rhino/src/main/java/org/mozilla/javascript/Synchronizer.java @@ -47,7 +47,9 @@ public Synchronizer(Scriptable obj, Object syncObject) { this.syncObject = syncObject; } - /** @see org.mozilla.javascript.Function#call */ + /** + * @see org.mozilla.javascript.Function#call + */ @Override public Object call(Context cx, Scriptable scope, Scriptable thisObj, Object[] args) { Object sync = syncObject != null ? syncObject : thisObj; diff --git a/rhino/src/main/java/org/mozilla/javascript/TokenStream.java b/rhino/src/main/java/org/mozilla/javascript/TokenStream.java index d84f589813..3d5ae78fe4 100644 --- a/rhino/src/main/java/org/mozilla/javascript/TokenStream.java +++ b/rhino/src/main/java/org/mozilla/javascript/TokenStream.java @@ -1013,8 +1013,8 @@ final int getToken() throws IOException { c = '\t'; break; - // \v a late addition to the ECMA spec, - // it is not in Java, so use 0xb + // \v a late addition to the ECMA spec, + // it is not in Java, so use 0xb case 'v': c = 0xb; break; diff --git a/rhino/src/main/java/org/mozilla/javascript/WrapFactory.java b/rhino/src/main/java/org/mozilla/javascript/WrapFactory.java index 3a21509108..09f2859995 100644 --- a/rhino/src/main/java/org/mozilla/javascript/WrapFactory.java +++ b/rhino/src/main/java/org/mozilla/javascript/WrapFactory.java @@ -149,7 +149,9 @@ public final boolean isJavaPrimitiveWrap() { return javaPrimitiveWrap; } - /** @see #isJavaPrimitiveWrap() */ + /** + * @see #isJavaPrimitiveWrap() + */ public final void setJavaPrimitiveWrap(boolean value) { Context cx = Context.getCurrentContext(); if (cx != null && cx.isSealed()) { diff --git a/rhino/src/main/java/org/mozilla/javascript/WrappedException.java b/rhino/src/main/java/org/mozilla/javascript/WrappedException.java index 00646b9976..022314cd2c 100644 --- a/rhino/src/main/java/org/mozilla/javascript/WrappedException.java +++ b/rhino/src/main/java/org/mozilla/javascript/WrappedException.java @@ -16,7 +16,9 @@ public class WrappedException extends EvaluatorException { private static final long serialVersionUID = -1551979216966520648L; - /** @see Context#throwAsScriptRuntimeEx(Throwable e) */ + /** + * @see Context#throwAsScriptRuntimeEx(Throwable e) + */ public WrappedException(Throwable exception) { super("Wrapped " + exception); this.exception = exception; @@ -43,7 +45,9 @@ public Throwable getWrappedException() { return exception; } - /** @deprecated Use {@link #getWrappedException()} instead. */ + /** + * @deprecated Use {@link #getWrappedException()} instead. + */ @Deprecated public Object unwrap() { return getWrappedException(); 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 45225ebb53..f5465dbaef 100644 --- a/rhino/src/main/java/org/mozilla/javascript/ast/AstNode.java +++ b/rhino/src/main/java/org/mozilla/javascript/ast/AstNode.java @@ -465,7 +465,9 @@ protected void printList(List items, StringBuilder sb) { } } - /** @see Kit#codeBug */ + /** + * @see Kit#codeBug + */ public static RuntimeException codeBug() throws RuntimeException { throw Kit.codeBug(); } diff --git a/rhino/src/main/java/org/mozilla/javascript/ast/ScriptNode.java b/rhino/src/main/java/org/mozilla/javascript/ast/ScriptNode.java index c7f74d756b..bd23c869dc 100644 --- a/rhino/src/main/java/org/mozilla/javascript/ast/ScriptNode.java +++ b/rhino/src/main/java/org/mozilla/javascript/ast/ScriptNode.java @@ -118,7 +118,9 @@ public void setRawSource(String rawSource) { this.rawSource = rawSource; } - /** @return the raw source, or {@code null} if it was not recorded. */ + /** + * @return the raw source, or {@code null} if it was not recorded. + */ public String getRawSource() { return rawSource; } diff --git a/rhino/src/main/java/org/mozilla/javascript/optimizer/Block.java b/rhino/src/main/java/org/mozilla/javascript/optimizer/Block.java index f6ed1acef9..e9e0d54a4d 100644 --- a/rhino/src/main/java/org/mozilla/javascript/optimizer/Block.java +++ b/rhino/src/main/java/org/mozilla/javascript/optimizer/Block.java @@ -527,7 +527,7 @@ private static int findExpressionType(OptFunctionNode fn, Node n, int[] varTypes case Token.TEMPLATE_LITERAL: case Token.BIGINT: return Optimizer.AnyType; // XXX: actually, we know it's not - // number, but no type yet for that + // number, but no type yet for that case Token.ADD: { diff --git a/rhino/src/main/java/org/mozilla/javascript/optimizer/OptRuntime.java b/rhino/src/main/java/org/mozilla/javascript/optimizer/OptRuntime.java index 6e117874fd..80ae3ae1bd 100644 --- a/rhino/src/main/java/org/mozilla/javascript/optimizer/OptRuntime.java +++ b/rhino/src/main/java/org/mozilla/javascript/optimizer/OptRuntime.java @@ -93,7 +93,9 @@ public static Object add(double val1, Object val2, Context cx) { return ScriptRuntime.add(val1, val2, cx); } - /** @deprecated Use {@link #elemIncrDecr(Object, double, Context, Scriptable, int)} instead */ + /** + * @deprecated Use {@link #elemIncrDecr(Object, double, Context, Scriptable, int)} instead + */ @Deprecated public static Object elemIncrDecr(Object obj, double index, Context cx, int incrDecrMask) { return elemIncrDecr(obj, index, cx, getTopCallScope(cx), incrDecrMask); diff --git a/rhino/src/main/java/org/mozilla/javascript/regexp/NativeRegExp.java b/rhino/src/main/java/org/mozilla/javascript/regexp/NativeRegExp.java index 0ad57bd440..40d17f282f 100644 --- a/rhino/src/main/java/org/mozilla/javascript/regexp/NativeRegExp.java +++ b/rhino/src/main/java/org/mozilla/javascript/regexp/NativeRegExp.java @@ -593,7 +593,7 @@ private static boolean calculateBitmapSize( break; case 'u': nDigits += 2; - // fall through + // fall through case 'x': n = 0; for (i = 0; (i < nDigits) && (index < end); i++) { @@ -786,7 +786,7 @@ private static boolean parseTerm(CompilerState state) { int termStart; switch (c) { - /* assertions and atoms */ + /* assertions and atoms */ case '^': state.result = new RENode(REOP_BOL); state.progLength++; @@ -799,7 +799,7 @@ private static boolean parseTerm(CompilerState state) { if (state.cp < state.cpend) { c = src[state.cp++]; switch (c) { - /* assertion escapes */ + /* assertion escapes */ case 'b': state.result = new RENode(REOP_WBDRY); state.progLength++; @@ -808,7 +808,7 @@ private static boolean parseTerm(CompilerState state) { state.result = new RENode(REOP_WNONBDRY); state.progLength++; return true; - /* Decimal escape */ + /* Decimal escape */ case '0': /* * We're deliberately violating the ECMA 5.1 specification and allow octal @@ -878,7 +878,7 @@ private static boolean parseTerm(CompilerState state) { state.maxBackReference = num; } break; - /* Control escape */ + /* Control escape */ case 'f': c = 0xC; doFlat(state, c); @@ -899,7 +899,7 @@ private static boolean parseTerm(CompilerState state) { c = 0xB; doFlat(state, c); break; - /* Control letter */ + /* Control letter */ case 'c': if ((state.cp < state.cpend) && isControlLetter(src[state.cp])) c = (char) (src[state.cp++] & 0x1F); @@ -910,10 +910,10 @@ private static boolean parseTerm(CompilerState state) { } doFlat(state, c); break; - /* UnicodeEscapeSequence */ + /* UnicodeEscapeSequence */ case 'u': nDigits += 2; - /* fall through */ case 'x': /* HexEscapeSequence */ + /* fall through */ case 'x': /* HexEscapeSequence */ { int n = 0; int i; @@ -932,7 +932,7 @@ private static boolean parseTerm(CompilerState state) { } doFlat(state, c); break; - /* Character class escapes */ + /* Character class escapes */ case 'd': state.result = new RENode(REOP_DIGIT); state.progLength++; @@ -957,7 +957,7 @@ private static boolean parseTerm(CompilerState state) { state.result = new RENode(REOP_NONALNUM); state.progLength++; break; - /* IdentityEscape */ + /* IdentityEscape */ default: state.result = new RENode(REOP_FLAT); state.result.chr = c; @@ -1194,7 +1194,7 @@ private static int emitREBytecode(CompilerState state, RECompiled re, int pc, RE pc += INDEX_LEN; addIndex(program, pc, ignoreCase ? upcase((char) t.index) : t.index); pc += INDEX_LEN; - // fall through to REOP_ALT + // fall through to REOP_ALT case REOP_ALT: nextAlt = t.kid2; nextAltFixup = pc; /* address of next alternate */ @@ -1517,7 +1517,7 @@ private static void processCharSetImpl(REGlobalData gData, RECharSet charSet) { break; case 'u': nDigits += 2; - // fall through + // fall through case 'x': n = 0; for (i = 0; (i < nDigits) && (src < end); i++) { @@ -1936,8 +1936,8 @@ private static boolean executeREBytecode( } } } - /* else false thru... */ - // fall through + /* else false thru... */ + // fall through case REOP_ALT: { int nextpc = pc + getOffset(program, pc); @@ -2062,28 +2062,28 @@ && simpleMatch(gData, input, op, program, pc, end, false) < 0) { switch (op) { case REOP_STAR: greedy = true; - // fallthrough + // fallthrough case REOP_MINIMALSTAR: min = 0; max = -1; break; case REOP_PLUS: greedy = true; - // fallthrough + // fallthrough case REOP_MINIMALPLUS: min = 1; max = -1; break; case REOP_OPT: greedy = true; - // fallthrough + // fallthrough case REOP_MINIMALOPT: min = 0; max = 1; break; case REOP_QUANT: greedy = true; - // fallthrough + // fallthrough case REOP_MINIMALQUANT: min = getOffset(program, pc); pc += INDEX_LEN; diff --git a/rhino/src/test/java/org/mozilla/javascript/SlotMapTest.java b/rhino/src/test/java/org/mozilla/javascript/SlotMapTest.java index b5701f454e..9394c3b77c 100644 --- a/rhino/src/test/java/org/mozilla/javascript/SlotMapTest.java +++ b/rhino/src/test/java/org/mozilla/javascript/SlotMapTest.java @@ -20,8 +20,12 @@ public class SlotMapTest { private final SlotMap map; public SlotMapTest(Class mapClass) - throws IllegalAccessException, InstantiationException, IllegalArgumentException, - InvocationTargetException, NoSuchMethodException, SecurityException { + throws IllegalAccessException, + InstantiationException, + IllegalArgumentException, + InvocationTargetException, + NoSuchMethodException, + SecurityException { this.map = mapClass.getDeclaredConstructor().newInstance(); } diff --git a/rhino/src/test/java/org/mozilla/javascript/tests/Bug491621Test.java b/rhino/src/test/java/org/mozilla/javascript/tests/Bug491621Test.java index 754250fee3..7b8f45501b 100644 --- a/rhino/src/test/java/org/mozilla/javascript/tests/Bug491621Test.java +++ b/rhino/src/test/java/org/mozilla/javascript/tests/Bug491621Test.java @@ -11,7 +11,9 @@ import org.mozilla.javascript.Parser; import org.mozilla.javascript.ast.AstRoot; -/** @author Hannes Wallnoefer */ +/** + * @author Hannes Wallnoefer + */ public class Bug491621Test { /** diff --git a/rhino/src/test/java/org/mozilla/javascript/tests/Bug637811Test.java b/rhino/src/test/java/org/mozilla/javascript/tests/Bug637811Test.java index bd73dd70b3..801abf27dd 100755 --- a/rhino/src/test/java/org/mozilla/javascript/tests/Bug637811Test.java +++ b/rhino/src/test/java/org/mozilla/javascript/tests/Bug637811Test.java @@ -10,7 +10,9 @@ import org.mozilla.javascript.Context; import org.mozilla.javascript.ContextFactory; -/** @author André Bargull */ +/** + * @author André Bargull + */ public class Bug637811Test { private Context cx; diff --git a/rhino/src/test/java/org/mozilla/javascript/tests/Bug685403Test.java b/rhino/src/test/java/org/mozilla/javascript/tests/Bug685403Test.java index 5c21cc1513..1624eb201c 100755 --- a/rhino/src/test/java/org/mozilla/javascript/tests/Bug685403Test.java +++ b/rhino/src/test/java/org/mozilla/javascript/tests/Bug685403Test.java @@ -17,7 +17,9 @@ import org.mozilla.javascript.Scriptable; import org.mozilla.javascript.ScriptableObject; -/** @author André Bargull */ +/** + * @author André Bargull + */ public class Bug685403Test { private Context cx; diff --git a/rhino/src/test/java/org/mozilla/javascript/tests/Bug687669Test.java b/rhino/src/test/java/org/mozilla/javascript/tests/Bug687669Test.java index 927787da25..1d5b6f16e9 100644 --- a/rhino/src/test/java/org/mozilla/javascript/tests/Bug687669Test.java +++ b/rhino/src/test/java/org/mozilla/javascript/tests/Bug687669Test.java @@ -18,7 +18,9 @@ import org.mozilla.javascript.Undefined; import org.mozilla.javascript.ast.AstRoot; -/** @author André Bargull */ +/** + * @author André Bargull + */ public class Bug687669Test { private Context cx; diff --git a/rhino/src/test/java/org/mozilla/javascript/tests/Bug688018Test.java b/rhino/src/test/java/org/mozilla/javascript/tests/Bug688018Test.java index e00074390a..12389a5005 100644 --- a/rhino/src/test/java/org/mozilla/javascript/tests/Bug688018Test.java +++ b/rhino/src/test/java/org/mozilla/javascript/tests/Bug688018Test.java @@ -16,7 +16,9 @@ import org.mozilla.javascript.Parser; import org.mozilla.javascript.ast.AstRoot; -/** @author André Bargull */ +/** + * @author André Bargull + */ public class Bug688018Test { private Context cx; diff --git a/rhino/src/test/java/org/mozilla/javascript/tests/Bug688021Test.java b/rhino/src/test/java/org/mozilla/javascript/tests/Bug688021Test.java index 17297088ce..7892da38a0 100644 --- a/rhino/src/test/java/org/mozilla/javascript/tests/Bug688021Test.java +++ b/rhino/src/test/java/org/mozilla/javascript/tests/Bug688021Test.java @@ -16,7 +16,9 @@ import org.mozilla.javascript.Parser; import org.mozilla.javascript.ast.AstRoot; -/** @author André Bargull */ +/** + * @author André Bargull + */ public class Bug688021Test { private Context cx; diff --git a/rhino/src/test/java/org/mozilla/javascript/tests/Bug688023Test.java b/rhino/src/test/java/org/mozilla/javascript/tests/Bug688023Test.java index 04fd88acc6..9ffe4cb18a 100755 --- a/rhino/src/test/java/org/mozilla/javascript/tests/Bug688023Test.java +++ b/rhino/src/test/java/org/mozilla/javascript/tests/Bug688023Test.java @@ -15,7 +15,9 @@ import org.mozilla.javascript.Parser; import org.mozilla.javascript.ast.AstRoot; -/** @author André Bargull */ +/** + * @author André Bargull + */ public class Bug688023Test { private Context cx; diff --git a/rhino/src/test/java/org/mozilla/javascript/tests/Bug689308Test.java b/rhino/src/test/java/org/mozilla/javascript/tests/Bug689308Test.java index 748e023683..0886e5ae18 100644 --- a/rhino/src/test/java/org/mozilla/javascript/tests/Bug689308Test.java +++ b/rhino/src/test/java/org/mozilla/javascript/tests/Bug689308Test.java @@ -16,7 +16,9 @@ import org.mozilla.javascript.Parser; import org.mozilla.javascript.ast.AstRoot; -/** @author André Bargull */ +/** + * @author André Bargull + */ public class Bug689308Test { private Context cx; diff --git a/rhino/src/test/java/org/mozilla/javascript/tests/Bug689314Test.java b/rhino/src/test/java/org/mozilla/javascript/tests/Bug689314Test.java index 3239434912..64032936c1 100644 --- a/rhino/src/test/java/org/mozilla/javascript/tests/Bug689314Test.java +++ b/rhino/src/test/java/org/mozilla/javascript/tests/Bug689314Test.java @@ -16,7 +16,9 @@ import org.mozilla.javascript.Parser; import org.mozilla.javascript.ast.AstRoot; -/** @author André Bargull */ +/** + * @author André Bargull + */ public class Bug689314Test { private Context cx; diff --git a/rhino/src/test/java/org/mozilla/javascript/tests/Bug708801Test.java b/rhino/src/test/java/org/mozilla/javascript/tests/Bug708801Test.java index 4226cbbc7c..a8e884c373 100644 --- a/rhino/src/test/java/org/mozilla/javascript/tests/Bug708801Test.java +++ b/rhino/src/test/java/org/mozilla/javascript/tests/Bug708801Test.java @@ -30,7 +30,9 @@ import org.mozilla.javascript.optimizer.Codegen; import org.mozilla.javascript.optimizer.OptFunctionNode; -/** @author André Bargull */ +/** + * @author André Bargull + */ public class Bug708801Test { private static final ContextFactory factory = diff --git a/rhino/src/test/java/org/mozilla/javascript/tests/Bug714204Test.java b/rhino/src/test/java/org/mozilla/javascript/tests/Bug714204Test.java index 1408723c3c..78f3f1c2e5 100644 --- a/rhino/src/test/java/org/mozilla/javascript/tests/Bug714204Test.java +++ b/rhino/src/test/java/org/mozilla/javascript/tests/Bug714204Test.java @@ -15,7 +15,9 @@ import org.mozilla.javascript.Script; import org.mozilla.javascript.ScriptableObject; -/** @author André Bargull */ +/** + * @author André Bargull + */ public class Bug714204Test { private Context cx; diff --git a/rhino/src/test/java/org/mozilla/javascript/tests/Bug782363Test.java b/rhino/src/test/java/org/mozilla/javascript/tests/Bug782363Test.java index 77a4f66b89..92c72c8992 100755 --- a/rhino/src/test/java/org/mozilla/javascript/tests/Bug782363Test.java +++ b/rhino/src/test/java/org/mozilla/javascript/tests/Bug782363Test.java @@ -30,7 +30,9 @@ import org.mozilla.javascript.optimizer.Codegen; import org.mozilla.javascript.optimizer.OptFunctionNode; -/** @author André Bargull */ +/** + * @author André Bargull + */ public class Bug782363Test { private Context cx; diff --git a/rhino/src/test/java/org/mozilla/javascript/tests/Bug783797Test.java b/rhino/src/test/java/org/mozilla/javascript/tests/Bug783797Test.java index 16f2da1651..88d5521538 100755 --- a/rhino/src/test/java/org/mozilla/javascript/tests/Bug783797Test.java +++ b/rhino/src/test/java/org/mozilla/javascript/tests/Bug783797Test.java @@ -14,7 +14,9 @@ import org.mozilla.javascript.Scriptable; import org.mozilla.javascript.ScriptableObject; -/** @author André Bargull */ +/** + * @author André Bargull + */ public class Bug783797Test { private interface Action { diff --git a/rhino/src/test/java/org/mozilla/javascript/tests/Bug789277Test.java b/rhino/src/test/java/org/mozilla/javascript/tests/Bug789277Test.java index c519684111..3ba4f55427 100755 --- a/rhino/src/test/java/org/mozilla/javascript/tests/Bug789277Test.java +++ b/rhino/src/test/java/org/mozilla/javascript/tests/Bug789277Test.java @@ -25,7 +25,9 @@ import org.mozilla.javascript.ast.AstRoot; import org.mozilla.javascript.ast.IdeErrorReporter; -/** @author André Bargull */ +/** + * @author André Bargull + */ @SuppressWarnings("serial") @RunWith(Parameterized.class) public class Bug789277Test { diff --git a/rhino/src/test/java/org/mozilla/javascript/tests/ClassShutterExceptionTest.java b/rhino/src/test/java/org/mozilla/javascript/tests/ClassShutterExceptionTest.java index 52de1e8087..f5b17b2c98 100644 --- a/rhino/src/test/java/org/mozilla/javascript/tests/ClassShutterExceptionTest.java +++ b/rhino/src/test/java/org/mozilla/javascript/tests/ClassShutterExceptionTest.java @@ -14,7 +14,9 @@ import org.mozilla.javascript.RhinoException; import org.mozilla.javascript.Scriptable; -/** @author Norris Boyd */ +/** + * @author Norris Boyd + */ public class ClassShutterExceptionTest { private static Context.ClassShutterSetter classShutterSetter; diff --git a/rhino/src/test/java/org/mozilla/javascript/tests/NativeJsonTest.java b/rhino/src/test/java/org/mozilla/javascript/tests/NativeJsonTest.java index 6ee6213af6..cdc9ccf93c 100644 --- a/rhino/src/test/java/org/mozilla/javascript/tests/NativeJsonTest.java +++ b/rhino/src/test/java/org/mozilla/javascript/tests/NativeJsonTest.java @@ -11,7 +11,9 @@ import org.mozilla.javascript.Context; import org.mozilla.javascript.Scriptable; -/** @author Ronald Brill */ +/** + * @author Ronald Brill + */ public class NativeJsonTest { @Test diff --git a/rhino/src/test/java/org/mozilla/javascript/tests/NativeRegExpTest.java b/rhino/src/test/java/org/mozilla/javascript/tests/NativeRegExpTest.java index c9816fdb72..10a198a815 100644 --- a/rhino/src/test/java/org/mozilla/javascript/tests/NativeRegExpTest.java +++ b/rhino/src/test/java/org/mozilla/javascript/tests/NativeRegExpTest.java @@ -25,223 +25,297 @@ public void openBrace() { }); } - /** @throws Exception if an error occurs */ + /** + * @throws Exception if an error occurs + */ @Test public void globalCtor() throws Exception { testEvaluate("g-true-false-false-false-false", "new RegExp('foo', 'g');"); } - /** @throws Exception if an error occurs */ + /** + * @throws Exception if an error occurs + */ @Test public void global() throws Exception { testEvaluate("g-true-false-false-false-false", "/foo/g;"); } - /** @throws Exception if an error occurs */ + /** + * @throws Exception if an error occurs + */ @Test public void ignoreCaseCtor() throws Exception { testEvaluate("i-false-true-false-false-false", "new RegExp('foo', 'i');"); } - /** @throws Exception if an error occurs */ + /** + * @throws Exception if an error occurs + */ @Test public void ignoreCase() throws Exception { testEvaluate("i-false-true-false-false-false", "/foo/i;"); } - /** @throws Exception if an error occurs */ + /** + * @throws Exception if an error occurs + */ @Test public void multilineCtor() throws Exception { testEvaluate("m-false-false-true-false-false", "new RegExp('foo', 'm');"); } - /** @throws Exception if an error occurs */ + /** + * @throws Exception if an error occurs + */ @Test public void multiline() throws Exception { testEvaluate("m-false-false-true-false-false", "/foo/m;"); } - /** @throws Exception if an error occurs */ + /** + * @throws Exception if an error occurs + */ @Test public void dotAllCtor() throws Exception { testEvaluate("s-false-false-false-true-false", "new RegExp('foo', 's');"); } - /** @throws Exception if an error occurs */ + /** + * @throws Exception if an error occurs + */ @Test public void dotAll() throws Exception { testEvaluate("s-false-false-false-true-false", "/foo/s;"); } - /** @throws Exception if an error occurs */ + /** + * @throws Exception if an error occurs + */ @Test public void stickyCtor() throws Exception { testEvaluate("y-false-false-false-false-true", "new RegExp('foo', 'y');"); } - /** @throws Exception if an error occurs */ + /** + * @throws Exception if an error occurs + */ @Test public void sticky() throws Exception { testEvaluate("y-false-false-false-false-true", "/foo/y;"); } - /** @throws Exception if an error occurs */ + /** + * @throws Exception if an error occurs + */ @Test public void globalMultilineCtor() throws Exception { testEvaluate("gm-true-false-true-false-false", "new RegExp('foo', 'gm');"); } - /** @throws Exception if an error occurs */ + /** + * @throws Exception if an error occurs + */ @Test public void globalMultiline() throws Exception { testEvaluate("gm-true-false-true-false-false", "/foo/gm;"); } - /** @throws Exception if an error occurs */ + /** + * @throws Exception if an error occurs + */ @Test public void globalDotAll() throws Exception { testEvaluate("gs-true-false-false-true-false", "/foo/gs;"); } - /** @throws Exception if an error occurs */ + /** + * @throws Exception if an error occurs + */ @Test public void globalIgnoreCaseCtor() throws Exception { testEvaluate("gi-true-true-false-false-false", "new RegExp('foo', 'ig');"); } - /** @throws Exception if an error occurs */ + /** + * @throws Exception if an error occurs + */ @Test public void globalIgnoreCase() throws Exception { testEvaluate("gi-true-true-false-false-false", "/foo/ig;"); } - /** @throws Exception if an error occurs */ + /** + * @throws Exception if an error occurs + */ @Test public void globalStickyCtor() throws Exception { testEvaluate("gy-true-false-false-false-true", "new RegExp('foo', 'gy');"); } - /** @throws Exception if an error occurs */ + /** + * @throws Exception if an error occurs + */ @Test public void globalSticky() throws Exception { testEvaluate("gy-true-false-false-false-true", "/foo/gy;"); } - /** @throws Exception if an error occurs */ + /** + * @throws Exception if an error occurs + */ @Test public void globalMultilineIgnoreCaseCtor() throws Exception { testEvaluate("gim-true-true-true-false-false", "new RegExp('foo', 'mig');"); } - /** @throws Exception if an error occurs */ + /** + * @throws Exception if an error occurs + */ @Test public void globalMultilineIgnoreCase() throws Exception { testEvaluate("gim-true-true-true-false-false", "/foo/gmi;"); } - /** @throws Exception if an error occurs */ + /** + * @throws Exception if an error occurs + */ @Test public void globalDotAllIgnoreCaseCtor() throws Exception { testEvaluate("gis-true-true-false-true-false", "new RegExp('foo', 'gsi');"); } - /** @throws Exception if an error occurs */ + /** + * @throws Exception if an error occurs + */ @Test public void globalDotAllIgnoreCase() throws Exception { testEvaluate("gis-true-true-false-true-false", "/foo/gsi;"); } - /** @throws Exception if an error occurs */ + /** + * @throws Exception if an error occurs + */ @Test public void globalIgnoreCaseStickyCtor() throws Exception { testEvaluate("giy-true-true-false-false-true", "new RegExp('foo', 'yig');"); } - /** @throws Exception if an error occurs */ + /** + * @throws Exception if an error occurs + */ @Test public void globalIgnoreCaseSticky() throws Exception { testEvaluate("giy-true-true-false-false-true", "/foo/ygi;"); } - /** @throws Exception if an error occurs */ + /** + * @throws Exception if an error occurs + */ @Test public void globalMultilineStickyCtor() throws Exception { testEvaluate("gmy-true-false-true-false-true", "new RegExp('foo', 'gmy');"); } - /** @throws Exception if an error occurs */ + /** + * @throws Exception if an error occurs + */ @Test public void globalMultilineSticky() throws Exception { testEvaluate("gmy-true-false-true-false-true", "/foo/gmy;"); } - /** @throws Exception if an error occurs */ + /** + * @throws Exception if an error occurs + */ @Test public void globalDotAllStickyCtor() throws Exception { testEvaluate("gsy-true-false-false-true-true", "new RegExp('foo', 'gys');"); } - /** @throws Exception if an error occurs */ + /** + * @throws Exception if an error occurs + */ @Test public void globalDotAllSticky() throws Exception { testEvaluate("gsy-true-false-false-true-true", "/foo/gys;"); } - /** @throws Exception if an error occurs */ + /** + * @throws Exception if an error occurs + */ @Test public void ignoreCaseMultilineCtor() throws Exception { testEvaluate("im-false-true-true-false-false", "new RegExp('foo', 'im');"); } - /** @throws Exception if an error occurs */ + /** + * @throws Exception if an error occurs + */ @Test public void ignoreCaseMultiline() throws Exception { testEvaluate("im-false-true-true-false-false", "/foo/mi;"); } - /** @throws Exception if an error occurs */ + /** + * @throws Exception if an error occurs + */ @Test public void ignoreCaseDotAllCtor() throws Exception { testEvaluate("is-false-true-false-true-false", "new RegExp('foo', 'si');"); } - /** @throws Exception if an error occurs */ + /** + * @throws Exception if an error occurs + */ @Test public void ignoreCaseDotAll() throws Exception { testEvaluate("is-false-true-false-true-false", "/foo/si;"); } - /** @throws Exception if an error occurs */ + /** + * @throws Exception if an error occurs + */ @Test public void ignoreCaseStickyCtor() throws Exception { testEvaluate("iy-false-true-false-false-true", "new RegExp('foo', 'yi');"); } - /** @throws Exception if an error occurs */ + /** + * @throws Exception if an error occurs + */ @Test public void ignoreCaseSticky() throws Exception { testEvaluate("iy-false-true-false-false-true", "/foo/iy;"); } - /** @throws Exception if an error occurs */ + /** + * @throws Exception if an error occurs + */ @Test public void multilineStickyCtor() throws Exception { testEvaluate("my-false-false-true-false-true", "new RegExp('foo', 'my');"); } - /** @throws Exception if an error occurs */ + /** + * @throws Exception if an error occurs + */ @Test public void multilineSticky() throws Exception { testEvaluate("my-false-false-true-false-true", "/foo/my;"); } - /** @throws Exception if an error occurs */ + /** + * @throws Exception if an error occurs + */ @Test public void dotAllStickyCtor() throws Exception { testEvaluate("sy-false-false-false-true-true", "new RegExp('foo', 'ys');"); } - /** @throws Exception if an error occurs */ + /** + * @throws Exception if an error occurs + */ @Test public void dotAllSticky() throws Exception { testEvaluate("sy-false-false-false-true-true", "/foo/ys;"); @@ -269,7 +343,9 @@ private static void testEvaluate(final String expected, final String regex) { test(expected, script); } - /** @throws Exception if an error occurs */ + /** + * @throws Exception if an error occurs + */ @Test public void stickyTest() throws Exception { final String script = @@ -286,7 +362,9 @@ public void stickyTest() throws Exception { test("true-9-false-0-false-0", script); } - /** @throws Exception if an error occurs */ + /** + * @throws Exception if an error occurs + */ @Test public void stickyStartOfLine() throws Exception { final String script = @@ -297,7 +375,9 @@ public void stickyStartOfLine() throws Exception { test("false", script); } - /** @throws Exception if an error occurs */ + /** + * @throws Exception if an error occurs + */ @Test public void stickyStartOfLineMultiline() throws Exception { final String script = @@ -310,7 +390,9 @@ public void stickyStartOfLineMultiline() throws Exception { test("false-true", script); } - /** @throws Exception if an error occurs */ + /** + * @throws Exception if an error occurs + */ @Test public void matchGlobal() throws Exception { final String script = @@ -323,7 +405,9 @@ public void matchGlobal() throws Exception { test("3-a-a-a", script); } - /** @throws Exception if an error occurs */ + /** + * @throws Exception if an error occurs + */ // TODO @Test public void matchGlobalSymbol() throws Exception { final String script = @@ -336,7 +420,9 @@ public void matchGlobalSymbol() throws Exception { test("3-a-a-a", script); } - /** @throws Exception if an error occurs */ + /** + * @throws Exception if an error occurs + */ @Test public void matchDotAll() throws Exception { final String script = @@ -347,7 +433,9 @@ public void matchDotAll() throws Exception { test("1-bar\nfoo", script); } - /** @throws Exception if an error occurs */ + /** + * @throws Exception if an error occurs + */ @Test public void matchSticky() throws Exception { final String script = @@ -358,7 +446,9 @@ public void matchSticky() throws Exception { test("1-a", script); } - /** @throws Exception if an error occurs */ + /** + * @throws Exception if an error occurs + */ @Test public void matchStickySymbol() throws Exception { final String script = @@ -369,7 +459,9 @@ public void matchStickySymbol() throws Exception { test("1-a", script); } - /** @throws Exception if an error occurs */ + /** + * @throws Exception if an error occurs + */ @Test public void matchStickyAndGlobal() throws Exception { final String script = @@ -381,7 +473,9 @@ public void matchStickyAndGlobal() throws Exception { test("2-a-a", script); } - /** @throws Exception if an error occurs */ + /** + * @throws Exception if an error occurs + */ // TODO @Test public void matchStickyAndGlobalSymbol() throws Exception { final String script = @@ -393,7 +487,9 @@ public void matchStickyAndGlobalSymbol() throws Exception { test("2-a-a", script); } - /** @throws Exception if an error occurs */ + /** + * @throws Exception if an error occurs + */ // TODO @Test public void flagsPropery() throws Exception { final String script = @@ -407,7 +503,9 @@ public void flagsPropery() throws Exception { test("0-undefined-true-false-undefined", script); } - /** @throws Exception if an error occurs */ + /** + * @throws Exception if an error occurs + */ @Test public void objectToString() throws Exception { test("/undefined/undefined", "RegExp.prototype.toString.call({})"); diff --git a/rhino/src/test/java/org/mozilla/javascript/tests/WrapFactoryTest.java b/rhino/src/test/java/org/mozilla/javascript/tests/WrapFactoryTest.java index 6390dd1f80..50050beafd 100644 --- a/rhino/src/test/java/org/mozilla/javascript/tests/WrapFactoryTest.java +++ b/rhino/src/test/java/org/mozilla/javascript/tests/WrapFactoryTest.java @@ -13,7 +13,9 @@ import org.mozilla.javascript.Scriptable; import org.mozilla.javascript.ScriptableObject; -/** @author hatanaka */ +/** + * @author hatanaka + */ public class WrapFactoryTest { /** for your reference default setting (javaPrimitiveWrap = true) */ diff --git a/tests/src/test/java/org/mozilla/javascript/drivers/JsDriver.java b/tests/src/test/java/org/mozilla/javascript/drivers/JsDriver.java index 4e92fdc20c..d1374d309c 100644 --- a/tests/src/test/java/org/mozilla/javascript/drivers/JsDriver.java +++ b/tests/src/test/java/org/mozilla/javascript/drivers/JsDriver.java @@ -19,7 +19,9 @@ import org.w3c.dom.Element; import org.w3c.dom.NodeList; -/** @version $Id: JsDriver.java,v 1.10 2009/05/15 12:30:45 nboyd%atg.com Exp $ */ +/** + * @version $Id: JsDriver.java,v 1.10 2009/05/15 12:30:45 nboyd%atg.com Exp $ + */ public class JsDriver { private JsDriver() {} diff --git a/tests/src/test/java/org/mozilla/javascript/drivers/ShellTest.java b/tests/src/test/java/org/mozilla/javascript/drivers/ShellTest.java index 07e096cd74..e5fa96ca82 100644 --- a/tests/src/test/java/org/mozilla/javascript/drivers/ShellTest.java +++ b/tests/src/test/java/org/mozilla/javascript/drivers/ShellTest.java @@ -25,7 +25,9 @@ import org.mozilla.javascript.tools.shell.Main; import org.mozilla.javascript.tools.shell.ShellContextFactory; -/** @version $Id: ShellTest.java,v 1.14 2011/03/29 15:17:49 hannes%helma.at Exp $ */ +/** + * @version $Id: ShellTest.java,v 1.14 2011/03/29 15:17:49 hannes%helma.at Exp $ + */ public class ShellTest { private static File frameworkFile; private static Script frameworkScript; diff --git a/tests/src/test/java/org/mozilla/javascript/tests/JavaAcessibilityTest.java b/tests/src/test/java/org/mozilla/javascript/tests/JavaAcessibilityTest.java index 2e5405717f..bcf041d494 100644 --- a/tests/src/test/java/org/mozilla/javascript/tests/JavaAcessibilityTest.java +++ b/tests/src/test/java/org/mozilla/javascript/tests/JavaAcessibilityTest.java @@ -18,7 +18,9 @@ import org.mozilla.javascript.tools.shell.Global; import org.mozilla.javascript.tools.shell.ShellContextFactory; -/** @author donnamalayeri */ +/** + * @author donnamalayeri + */ public class JavaAcessibilityTest { protected final Global global = new Global(); diff --git a/tests/src/test/java/org/mozilla/javascript/tests/ObserveInstructionCountTest.java b/tests/src/test/java/org/mozilla/javascript/tests/ObserveInstructionCountTest.java index 01ab3244f9..a17ffd554b 100644 --- a/tests/src/test/java/org/mozilla/javascript/tests/ObserveInstructionCountTest.java +++ b/tests/src/test/java/org/mozilla/javascript/tests/ObserveInstructionCountTest.java @@ -15,7 +15,9 @@ import org.mozilla.javascript.ContextFactory; import org.mozilla.javascript.Scriptable; -/** @author Norris Boyd */ +/** + * @author Norris Boyd + */ public class ObserveInstructionCountTest { static class MyContext extends Context { diff --git a/tests/src/test/java/org/mozilla/javascript/tests/StackTraceTest.java b/tests/src/test/java/org/mozilla/javascript/tests/StackTraceTest.java index e14800ac7a..5abf43c1ae 100644 --- a/tests/src/test/java/org/mozilla/javascript/tests/StackTraceTest.java +++ b/tests/src/test/java/org/mozilla/javascript/tests/StackTraceTest.java @@ -13,7 +13,9 @@ import org.mozilla.javascript.Scriptable; import org.mozilla.javascript.StackStyle; -/** @author Marc Guillemot */ +/** + * @author Marc Guillemot + */ public class StackTraceTest { static final String LS = System.getProperty("line.separator"); diff --git a/tests/src/test/java/org/mozilla/javascript/tests/Test262SuiteTest.java b/tests/src/test/java/org/mozilla/javascript/tests/Test262SuiteTest.java index 92190c1eb2..7de540a7fb 100644 --- a/tests/src/test/java/org/mozilla/javascript/tests/Test262SuiteTest.java +++ b/tests/src/test/java/org/mozilla/javascript/tests/Test262SuiteTest.java @@ -429,7 +429,9 @@ public static void tearDownClass() { Pattern.compile( "(~|(?:\\s*)(?:!|#)(?:\\s*)|\\s+)?(\\S+)(?:[^\\S\\r\\n]+(?:strict|non-strict|non-interpreted|\\d+/\\d+ \\(\\d+(?:\\.\\d+)?%%\\)|\\{(?:non-strict|strict|unsupported): \\[.*\\],?\\}))?[^\\S\\r\\n]*(.*)"); - /** @see https://github.com/tc39/test262/blob/main/INTERPRETING.md#host-defined-functions */ + /** + * @see https://github.com/tc39/test262/blob/main/INTERPRETING.md#host-defined-functions + */ public static class $262 { private ScriptableObject scope; diff --git a/tests/src/test/java/org/mozilla/javascript/tests/WriteReadOnlyPropertyTest.java b/tests/src/test/java/org/mozilla/javascript/tests/WriteReadOnlyPropertyTest.java index 1f00de63d5..366765c14c 100644 --- a/tests/src/test/java/org/mozilla/javascript/tests/WriteReadOnlyPropertyTest.java +++ b/tests/src/test/java/org/mozilla/javascript/tests/WriteReadOnlyPropertyTest.java @@ -22,13 +22,17 @@ */ public class WriteReadOnlyPropertyTest { - /** @throws Exception if the test fails */ + /** + * @throws Exception if the test fails + */ @Test public void writeReadOnly_accepted() throws Exception { testWriteReadOnly(true); } - /** @throws Exception if the test fails */ + /** + * @throws Exception if the test fails + */ @Test public void writeReadOnly_throws() throws Exception { try { diff --git a/tests/src/test/java/org/mozilla/javascript/tests/commentspr465/IfCommentsTest.java b/tests/src/test/java/org/mozilla/javascript/tests/commentspr465/IfCommentsTest.java index b4d046aed1..4d7dfd9a22 100644 --- a/tests/src/test/java/org/mozilla/javascript/tests/commentspr465/IfCommentsTest.java +++ b/tests/src/test/java/org/mozilla/javascript/tests/commentspr465/IfCommentsTest.java @@ -9,7 +9,9 @@ import org.mozilla.javascript.ast.FunctionNode; import org.mozilla.javascript.ast.IfStatement; -/** @author ravik @@since 08/08/18 12:01 PM */ +/** + * @author ravik @@since 08/08/18 12:01 PM + */ public class IfCommentsTest { @Test diff --git a/tests/src/test/java/org/mozilla/javascript/tests/commentspr465/LoopCommentsTest.java b/tests/src/test/java/org/mozilla/javascript/tests/commentspr465/LoopCommentsTest.java index b5ade251e0..1ec0f22039 100644 --- a/tests/src/test/java/org/mozilla/javascript/tests/commentspr465/LoopCommentsTest.java +++ b/tests/src/test/java/org/mozilla/javascript/tests/commentspr465/LoopCommentsTest.java @@ -12,7 +12,9 @@ import org.mozilla.javascript.ast.WhileLoop; import org.mozilla.javascript.ast.WithStatement; -/** @author ravik @@since 08/08/18 2:31 PM */ +/** + * @author ravik @@since 08/08/18 2:31 PM + */ public class LoopCommentsTest { @Test diff --git a/tests/src/test/java/org/mozilla/javascript/tests/commentspr465/MiscCommentsTest.java b/tests/src/test/java/org/mozilla/javascript/tests/commentspr465/MiscCommentsTest.java index 88c574f701..615bdfe852 100644 --- a/tests/src/test/java/org/mozilla/javascript/tests/commentspr465/MiscCommentsTest.java +++ b/tests/src/test/java/org/mozilla/javascript/tests/commentspr465/MiscCommentsTest.java @@ -8,7 +8,9 @@ import org.mozilla.javascript.ast.FunctionNode; import org.mozilla.javascript.ast.TryStatement; -/** @author ravik @@since 08/08/18 3:13 PM */ +/** + * @author ravik @@since 08/08/18 3:13 PM + */ public class MiscCommentsTest { @Test diff --git a/tests/src/test/java/org/mozilla/javascript/tests/commentspr465/SwitchCommentsTest.java b/tests/src/test/java/org/mozilla/javascript/tests/commentspr465/SwitchCommentsTest.java index 5904dec6bb..d77240c0c5 100644 --- a/tests/src/test/java/org/mozilla/javascript/tests/commentspr465/SwitchCommentsTest.java +++ b/tests/src/test/java/org/mozilla/javascript/tests/commentspr465/SwitchCommentsTest.java @@ -11,7 +11,9 @@ import org.mozilla.javascript.ast.SwitchCase; import org.mozilla.javascript.ast.SwitchStatement; -/** @author ravik @@since 07/08/18 12:36 PM */ +/** + * @author ravik @@since 07/08/18 12:36 PM + */ public class SwitchCommentsTest { @Test diff --git a/tests/src/test/java/org/mozilla/javascript/tests/es5/Test262RegExpTest.java b/tests/src/test/java/org/mozilla/javascript/tests/es5/Test262RegExpTest.java index 56288e898e..1a7640be37 100644 --- a/tests/src/test/java/org/mozilla/javascript/tests/es5/Test262RegExpTest.java +++ b/tests/src/test/java/org/mozilla/javascript/tests/es5/Test262RegExpTest.java @@ -15,7 +15,9 @@ import org.mozilla.javascript.EcmaError; import org.mozilla.javascript.ScriptableObject; -/** @author André Bargull */ +/** + * @author André Bargull + */ public class Test262RegExpTest { private Context cx; private ScriptableObject scope; diff --git a/tests/src/test/java/org/mozilla/javascript/tests/es6/FunctionNullSetTest.java b/tests/src/test/java/org/mozilla/javascript/tests/es6/FunctionNullSetTest.java index 6fd3eef304..620e21f505 100644 --- a/tests/src/test/java/org/mozilla/javascript/tests/es6/FunctionNullSetTest.java +++ b/tests/src/test/java/org/mozilla/javascript/tests/es6/FunctionNullSetTest.java @@ -18,7 +18,9 @@ */ public class FunctionNullSetTest { - /** @throws Exception if the test fails */ + /** + * @throws Exception if the test fails + */ @Test public void setFunctionToNull() throws Exception { final String script = "function onclick() {onclick=null}"; diff --git a/tests/src/test/java/org/mozilla/javascript/tests/es6/NativeObjectTest.java b/tests/src/test/java/org/mozilla/javascript/tests/es6/NativeObjectTest.java index e047edb9f9..0025864b4c 100644 --- a/tests/src/test/java/org/mozilla/javascript/tests/es6/NativeObjectTest.java +++ b/tests/src/test/java/org/mozilla/javascript/tests/es6/NativeObjectTest.java @@ -390,7 +390,9 @@ private static void evaluateAndAssert(final String script, final Object expected } } - /** @throws Exception if the test fails */ + /** + * @throws Exception if the test fails + */ @Test public void definePropertyUsingConsString() throws Exception { final String script = diff --git a/tests/src/test/java/org/mozilla/javascript/tests/es6/NativeRegExpTest.java b/tests/src/test/java/org/mozilla/javascript/tests/es6/NativeRegExpTest.java index f45a4a6178..4ced8353c3 100644 --- a/tests/src/test/java/org/mozilla/javascript/tests/es6/NativeRegExpTest.java +++ b/tests/src/test/java/org/mozilla/javascript/tests/es6/NativeRegExpTest.java @@ -16,7 +16,9 @@ import org.mozilla.javascript.ScriptableObject; import org.mozilla.javascript.tests.Utils; -/** @author Ronald Brill */ +/** + * @author Ronald Brill + */ public class NativeRegExpTest { @Test diff --git a/tests/src/test/java/org/mozilla/javascript/tests/es6/TypedArrayJavaTest.java b/tests/src/test/java/org/mozilla/javascript/tests/es6/TypedArrayJavaTest.java index c325cf8347..c104c54416 100644 --- a/tests/src/test/java/org/mozilla/javascript/tests/es6/TypedArrayJavaTest.java +++ b/tests/src/test/java/org/mozilla/javascript/tests/es6/TypedArrayJavaTest.java @@ -22,7 +22,9 @@ public void subarrayWithoutParams() throws Exception { allTypes(script, "1,2"); } - /** @throws Exception if test failed */ + /** + * @throws Exception if test failed + */ @Test public void subarrayFromSubarray() throws Exception { subarrayFromSubarray(0, 7, 0, 6, "1,2,3,4,5,6,7 - 1,2,3,4,5,6"); diff --git a/tests/src/test/java/org/mozilla/javascript/tests/intl402/NativeStringTest.java b/tests/src/test/java/org/mozilla/javascript/tests/intl402/NativeStringTest.java index 2d8445861c..1582ad6819 100644 --- a/tests/src/test/java/org/mozilla/javascript/tests/intl402/NativeStringTest.java +++ b/tests/src/test/java/org/mozilla/javascript/tests/intl402/NativeStringTest.java @@ -14,7 +14,9 @@ import org.mozilla.javascript.Scriptable; import org.mozilla.javascript.tests.Utils; -/** @author Ronald Brill */ +/** + * @author Ronald Brill + */ public class NativeStringTest { private ContextFactory contextFactoryIntl402 = new ContextFactory() {