Skip to content

Commit

Permalink
feat: try 6.13.0 instead
Browse files Browse the repository at this point in the history
This is the version immediately before JVM 11 was the minimum version.
  • Loading branch information
midgleyc committed Aug 16, 2023
1 parent 977cc16 commit bf42817
Show file tree
Hide file tree
Showing 68 changed files with 509 additions and 171 deletions.
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ plugins {
id 'jacoco'
id 'distribution'
id 'checkstyle'
id 'com.diffplug.spotless' version "5.17.1"
id 'com.diffplug.spotless' version "6.13.0"
id 'com.github.spotbugs' version "4.7.1"
}

Expand Down Expand Up @@ -443,7 +443,7 @@ spotbugs {

spotless {
java {
googleJavaFormat('1.11.0').aosp()
googleJavaFormat().aosp()
}
}

Expand Down
4 changes: 3 additions & 1 deletion src/org/mozilla/javascript/BaseFunction.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,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);
Expand Down
4 changes: 3 additions & 1 deletion src/org/mozilla/javascript/ClassCache.java
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,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<CacheKey, JavaMembers> getClassCacheMap() {
if (classTable == null) {
// Use 1 as concurrency level here and for other concurrent hash maps
Expand Down
4 changes: 3 additions & 1 deletion src/org/mozilla/javascript/CompilerEnvirons.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
24 changes: 18 additions & 6 deletions src/org/mozilla/javascript/Context.java
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,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;

/**
Expand Down Expand Up @@ -947,36 +949,46 @@ 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) {
String msg = ScriptRuntime.getMessageById(messageId, arg1, arg2, arg3);
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) {
Expand Down
4 changes: 3 additions & 1 deletion src/org/mozilla/javascript/ContextFactory.java
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
8 changes: 6 additions & 2 deletions src/org/mozilla/javascript/ContextListener.java
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
8 changes: 6 additions & 2 deletions src/org/mozilla/javascript/ContinuationPending.java
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,9 @@ public void setContinuation(NativeContinuation continuation) {
this.continuationState = continuation;
}

/** @return internal continuation state */
/**
* @return internal continuation state
*/
NativeContinuation getContinuationState() {
return continuationState;
}
Expand All @@ -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;
}
Expand Down
68 changes: 51 additions & 17 deletions src/org/mozilla/javascript/Delegator.java
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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);
Expand All @@ -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();
Expand All @@ -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);
Expand All @@ -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();
Expand All @@ -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);
Expand Down
20 changes: 15 additions & 5 deletions src/org/mozilla/javascript/EcmaError.java
Original file line number Diff line number Diff line change
Expand Up @@ -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 <b>null</b>. */
/**
* @deprecated Always returns <b>null</b>.
*/
@Deprecated
public Scriptable getErrorObject() {
return null;
Expand Down
Loading

0 comments on commit bf42817

Please sign in to comment.