Skip to content

Commit

Permalink
Trim trailing whitespace
Browse files Browse the repository at this point in the history
  • Loading branch information
szegedi committed Jun 23, 2011
1 parent 00a72b5 commit 45702d2
Show file tree
Hide file tree
Showing 135 changed files with 948 additions and 948 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ class XML extends XMLObjectImpl
final static class XScriptAnnotation extends XmlBookmark implements Serializable
{
private static final long serialVersionUID = 1L;

javax.xml.namespace.QName _name;
XML _xScriptXML;

Expand Down Expand Up @@ -721,7 +721,7 @@ private XmlCursor copy (XmlCursor cursToCopy)
{
cursToCopy.toNextToken();
}

cursToCopy.copyXml(copyCurs);
if (!cursToCopy.toNextSibling()) // If element skip element.
{
Expand Down
2 changes: 1 addition & 1 deletion examples/File.java
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
public class File extends ScriptableObject {

/**
*
*
*/
private static final long serialVersionUID = 2549960399774237828L;
/**
Expand Down
2 changes: 1 addition & 1 deletion examples/Matrix.java
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
* js> defineClass("Matrix")
* js> var m = new Matrix(2); // A constructor call, see "Matrix(int dimension)"
* js> m // Object.toString will call "Matrix.getClassName()"
* [object Matrix]
* [object Matrix]
* js> m[0][0] = 3;
* 3
* js> uneval(m[0]); // an array was created automatically!
Expand Down
14 changes: 7 additions & 7 deletions src/org/mozilla/javascript/Arguments.java
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ private Object arg(int index) {
}

// the following helper methods assume that 0 < index < args.length

private void putIntoActivation(int index, Object value) {
String argName = activation.function.getParamOrVarName(index);
activation.put(argName, activation, value);
Expand All @@ -108,7 +108,7 @@ private Object getFromActivation(int index) {
private void replaceArg(int index, Object value) {
if (sharedWithActivation(index)) {
putIntoActivation(index, value);
}
}
synchronized (this) {
if (args == activation.originalArgs) {
args = args.clone();
Expand Down Expand Up @@ -180,7 +180,7 @@ public void put(int index, Scriptable start, Object value)
if (arg(index) == NOT_FOUND) {
super.put(index, start, value);
} else {
replaceArg(index, value);
replaceArg(index, value);
}
}

Expand All @@ -189,7 +189,7 @@ public void delete(int index)
{
if (0 <= index && index < args.length) {
removeArg(index);
}
}
super.delete(index);
}

Expand Down Expand Up @@ -315,7 +315,7 @@ Object[] getIds(boolean getAll)
}
if (!getAll) { // avoid adding args which were redefined to non-enumerable
for (int i = 0; i < present.length; i++) {
if (!present[i] && super.has(i, this)) {
if (!present[i] && super.has(i, this)) {
present[i] = true;
extraCount--;
}
Expand Down Expand Up @@ -348,7 +348,7 @@ protected ScriptableObject getOwnPropertyDescriptor(Context cx, Object id) {
Object value = arg(index);
if (value == NOT_FOUND) {
return super.getOwnPropertyDescriptor(cx, id);
}
}
if (sharedWithActivation(index)) {
value = getFromActivation(index);
}
Expand Down Expand Up @@ -401,7 +401,7 @@ public void defineOwnProperty(Context cx, Object id, ScriptableObject desc) {

private NativeCall activation;

private BaseFunction objectCtor;
private BaseFunction objectCtor;

// Initially args holds activation.getOriginalArgs(), but any modification
// of its elements triggers creation of a copy. If its element holds NOT_FOUND,
Expand Down
12 changes: 6 additions & 6 deletions src/org/mozilla/javascript/BaseFunction.java
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public class BaseFunction extends IdScriptableObject implements Function
static void init(Scriptable scope, boolean sealed)
{
BaseFunction obj = new BaseFunction();
// Function.prototype attributes: see ECMA 15.3.3.1
// Function.prototype attributes: see ECMA 15.3.3.1
obj.prototypePropertyAttributes = DONTENUM | READONLY | PERMANENT;
obj.exportAsJSClass(MAX_PROTOTYPE_ID, scope, sealed);
}
Expand All @@ -74,9 +74,9 @@ public BaseFunction(Scriptable scope, Scriptable prototype)
public String getClassName() {
return "Function";
}

/**
* Gets the value returned by calling the typeof operator on this object.
* Gets the value returned by calling the typeof operator on this object.
* @see org.mozilla.javascript.ScriptableObject#getTypeOf()
* @return "function" or "undefined" if {@link #avoidObjectDetection()} returns <code>true</code>
*/
Expand Down Expand Up @@ -250,7 +250,7 @@ protected void initPrototypeId(int id)
static boolean isApply(IdFunctionObject f) {
return f.hasTag(FUNCTION_TAG) && f.methodId() == Id_apply;
}

static boolean isApplyOrCall(IdFunctionObject f) {
if(f.hasTag(FUNCTION_TAG)) {
switch(f.methodId()) {
Expand Down Expand Up @@ -550,7 +550,7 @@ private static Object jsConstructor(Context cx, Scriptable scope,
Evaluator evaluator = Context.createInterpreter();
if (evaluator == null) {
throw new JavaScriptException("Interpreter not present",
filename, linep[0]);
filename, linep[0]);
}

// Compile with explicit interpreter instance to force interpreter
Expand Down Expand Up @@ -599,7 +599,7 @@ protected int findPrototypeId(String s)

private Object prototypeProperty;
// For function object instances, attributes are
// {configurable:false, enumerable:false};
// {configurable:false, enumerable:false};
// see ECMA 15.3.5.2
private int prototypePropertyAttributes = PERMANENT|DONTENUM;
}
Expand Down
14 changes: 7 additions & 7 deletions src/org/mozilla/javascript/ClassCache.java
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public class ClassCache implements Serializable
private transient HashMap<JavaAdapter.JavaAdapterSignature,Class<?>> classAdapterCache;
private transient HashMap<Class<?>,Object> interfaceAdapterCache;
private int generatedClassSerial;
private Scriptable associatedScope;
private Scriptable associatedScope;

/**
* Search for ClassCache object in the given scope.
Expand Down Expand Up @@ -155,7 +155,7 @@ public synchronized void setCachingEnabled(boolean enabled)
clearCaches();
cachingIsEnabled = enabled;
}

/**
* @return a map from classes to associated JavaMembers objects
*/
Expand All @@ -165,15 +165,15 @@ Map<Class<?>,JavaMembers> getClassCacheMap() {
}
return classTable;
}

Map<JavaAdapter.JavaAdapterSignature,Class<?>> getInterfaceAdapterCacheMap()
{
if (classAdapterCache == null) {
classAdapterCache = new HashMap<JavaAdapter.JavaAdapterSignature,Class<?>>();
}
return classAdapterCache;
}

/**
* @deprecated
* The method always returns false.
Expand Down Expand Up @@ -208,8 +208,8 @@ public final synchronized int newClassSerialNumber()

Object getInterfaceAdapter(Class<?> cl)
{
return interfaceAdapterCache == null
? null
return interfaceAdapterCache == null
? null
: interfaceAdapterCache.get(cl);
}

Expand All @@ -222,7 +222,7 @@ synchronized void cacheInterfaceAdapter(Class<?> cl, Object iadapter)
interfaceAdapterCache.put(cl, iadapter);
}
}

Scriptable getAssociatedScope() {
return associatedScope;
}
Expand Down
2 changes: 1 addition & 1 deletion src/org/mozilla/javascript/CompilerEnvirons.java
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ public void initFromContext(Context cx)

generatingSource = cx.isGeneratingSource();
activationNames = cx.activationNames;

// Observer code generation in compiled code :
generateObserverCount = cx.generateObserverCount;
}
Expand Down
40 changes: 20 additions & 20 deletions src/org/mozilla/javascript/Context.java
Original file line number Diff line number Diff line change
Expand Up @@ -324,14 +324,14 @@ public class Context
public static final Object[] emptyArgs = ScriptRuntime.emptyArgs;

/**
* Creates a new Context. The context will be associated with the {@link
* Creates a new Context. The context will be associated with the {@link
* ContextFactory#getGlobal() global context factory}.
*
* Note that the Context must be associated with a thread before
* it can be used to execute a script.
* @deprecated this constructor is deprecated because it creates a
* dependency on a static singleton context factory. Use
* {@link ContextFactory#enter()} or
* @deprecated this constructor is deprecated because it creates a
* dependency on a static singleton context factory. Use
* {@link ContextFactory#enter()} or
* {@link ContextFactory#call(ContextAction)} instead. If you subclass
* this class, consider using {@link #Context(ContextFactory)} constructor
* instead in the subclasses' constructors.
Expand All @@ -340,13 +340,13 @@ public Context()
{
this(ContextFactory.getGlobal());
}

/**
* Creates a new context. Provided as a preferred super constructor for
* subclasses in place of the deprecated default public constructor.
* @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 factory, and the context will also
* features are inherited from the factory, and the context will also
* otherwise use its factory's services.
* @throws IllegalArgumentException if factory parameter is null.
*/
Expand Down Expand Up @@ -1144,11 +1144,11 @@ public final Object evaluateReader(Scriptable scope, Reader in,
return null;
}
}

/**
* Execute script that may pause execution by capturing a continuation.
* Caller must be prepared to catch a ContinuationPending exception
* and resume execution by calling
* and resume execution by calling
* {@link #resumeContinuation(Object, Scriptable, Object)}.
* @param script The script to execute. Script must have been compiled
* with interpreted mode (optimization level -1)
Expand All @@ -1171,11 +1171,11 @@ public Object executeScriptWithContinuations(Script script,
return callFunctionWithContinuations((InterpretedFunction) script,
scope, ScriptRuntime.emptyArgs);
}

/**
* Call function that may pause execution by capturing a continuation.
* Caller must be prepared to catch a ContinuationPending exception
* and resume execution by calling
* and resume execution by calling
* {@link #resumeContinuation(Object, Scriptable, Object)}.
* @param function The function to call. The function must have been
* compiled with interpreted mode (optimization level -1)
Expand Down Expand Up @@ -1203,10 +1203,10 @@ public Object callFunctionWithContinuations(Callable function,
isContinuationsTopCall = true;
return ScriptRuntime.doTopCall(function, this, scope, scope, args);
}

/**
* Capture a continuation from the current execution. The execution must
* have been started via a call to
* have been started via a call to
* {@link #executeScriptWithContinuations(Script, Scriptable)} or
* {@link #callFunctionWithContinuations(Callable, Scriptable, Object[])}.
* This implies that the code calling
Expand All @@ -1221,7 +1221,7 @@ public ContinuationPending captureContinuation() {
return new ContinuationPending(
Interpreter.captureContinuation(this));
}

/**
* Restarts execution of the JavaScript suspended at the call
* to {@link #captureContinuation()}. Execution of the code will resume
Expand All @@ -1230,7 +1230,7 @@ public ContinuationPending captureContinuation() {
* Execution of the script will either conclude normally and the
* result returned, another continuation will be captured and
* thrown, or the script will terminate abnormally and throw an exception.
* @param continuation The value returned by
* @param continuation The value returned by
* {@link ContinuationPending#getContinuation()}
* @param functionResult This value will appear to the code being resumed
* as the result of the function that captured the continuation
Expand Down Expand Up @@ -1336,7 +1336,7 @@ public final Script compileReader(Reader in, String sourceName,
*
* @param source the source string
* @param sourceName a string describing the source, such as a filename
* @param lineno the starting line number for reporting errors. Use
* @param lineno the starting line number for reporting errors. Use
* 0 if the line number is unknown.
* @param securityDomain an arbitrary object that specifies security
* information about the origin or owner of the script. For
Expand Down Expand Up @@ -1984,17 +1984,17 @@ public synchronized final void setClassShutter(ClassShutter shutter)
classShutter = shutter;
hasClassShutter = true;
}

final synchronized ClassShutter getClassShutter()
{
return classShutter;
}

public interface ClassShutterSetter {
public void setClassShutter(ClassShutter shutter);
public ClassShutter getClassShutter();
}

public final synchronized ClassShutterSetter getClassShutterSetter() {
if (hasClassShutter)
return null;
Expand Down Expand Up @@ -2197,10 +2197,10 @@ public boolean hasFeature(int featureIndex)
* Returns an object which specifies an E4X implementation to use within
* this <code>Context</code>. Note that the XMLLib.Factory interface should
* be considered experimental.
*
*
* The default implementation uses the implementation provided by this
* <code>Context</code>'s {@link ContextFactory}.
*
*
* @return An XMLLib.Factory. Should not return <code>null</code> if
* {@link #FEATURE_E4X} is enabled. See {@link #hasFeature}.
*/
Expand Down
Loading

0 comments on commit 45702d2

Please sign in to comment.