Skip to content

Commit

Permalink
Fix comments based on code review
Browse files Browse the repository at this point in the history
  • Loading branch information
gbrail committed Dec 17, 2024
1 parent 02232ed commit 2fc40e2
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions rhino/src/main/java/org/mozilla/javascript/Context.java
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@ public class Context implements Closeable {
* change in the future. In practice, for historical reasons, this is an odd version that
* doesn't necessarily match any particular version of JavaScript and should not be used.
*
* <p>Please use one of the other constants like VERSION_ES6 to get support for recent language
* features.
* <p>Please use one of the other constants like {@link #VERSION_ECMASCRIPT} to get support for
* recent language features.
*/
public static final int VERSION_UNKNOWN = -1;

Expand Down Expand Up @@ -379,10 +379,10 @@ public class Context implements Closeable {
/**
* Creates a new Context. The context will be associated with the {@link
* ContextFactory#getGlobal() global context factory}. By default, the new context will run in
* compiled mode and use the {@link #VERSION_ES6} language version, which supports features as
* defined in the most recent ECMAScript standard. This default behavior can be changed by
* overriding the ContextFactory class and installing the new implementation as the global
* ContextFactory.
* compiled mode and use the {@link #VERSION_ECMASCRIPT} language version, which supports
* features as defined in the most recent ECMAScript standard. This default behavior can be
* changed by overriding the ContextFactory class and installing the new implementation as the
* global ContextFactory.
*
* <p>Note that the Context must be associated with a thread before it can be used to execute a
* script.
Expand All @@ -400,9 +400,9 @@ public Context() {
/**
* Creates a new context. Provided as a preferred super constructor for subclasses in place of
* the deprecated default public constructor. By default, the new context will run in compiled
* mode and use the {@link #VERSION_ES6} language version, which supports features as defined in
* the most recent ECMAScript standard. This default behavior can be changed by overriding the
* ContextFactory class
* mode and use the {@link #VERSION_ECMASCRIPT} language version, which supports features as
* defined in the most recent ECMAScript standard. This default behavior can be changed by
* overriding the ContextFactory class
*
* @param factory the context factory associated with this context (most likely, the one that
* created the context). Can not be null. The context features are inherited from the
Expand Down Expand Up @@ -682,15 +682,15 @@ public final int getLanguageVersion() {
*
* <p>Setting the language version will affect functions and scripts compiled subsequently. See
* the overview documentation for version-specific behavior. The default version is {@link
* #VERSION_ES6}, which represents the newest ECMAScript features implemented by Rhino, and this
* is the version that should be used unless a project needs backwards compatibility with older
* Rhino scripts that may depend on behaviors from the earlier history of JavaScript.
* #VERSION_ECMASCRIPT}, which represents the newest ECMAScript features implemented by Rhino,
* and this is the version that should be used unless a project needs backwards compatibility
* with older Rhino scripts that may depend on behaviors from the earlier history of JavaScript.
*
* <p>As of version 1.8, the Rhino community has no plans to continue to add new language
* versions, but instead plans to track the ECMAScript standard and add new features as the
* language evolves in new versions of Rhino, like other JavaScript engines. Projects that use
* Rhino are encouraged to migrate to the {@link #VERSION_ES6} version and stop relying on older
* behaviors of Rhino that are no longer compatible with ECMAScript.
* Rhino are encouraged to migrate to the {@link #VERSION_ECMASCRIPT} version and stop relying
* on older behaviors of Rhino that are no longer compatible with ECMAScript.
*
* @param version the version as specified by VERSION_1_0, VERSION_1_1, etc.
*/
Expand Down

0 comments on commit 2fc40e2

Please sign in to comment.