8236435: Fix typos in javac area

Reviewed-by: jjg, mcimadamore
This commit is contained in:
Pavel Rappo 2019-12-24 09:38:41 +00:00
parent e2644b70cf
commit 911846b49b
65 changed files with 160 additions and 159 deletions

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2005, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -112,7 +112,7 @@ public interface Diagnostic<S> {
* associated with this diagnostic that indicates the location of
* the problem. In addition, the following must be true:
*
* <p>{@code getStartPostion() <= getPosition()}
* <p>{@code getStartPosition() <= getPosition()}
* <p>{@code getPosition() <= getEndPosition()}
*
* @return character offset from beginning of source; {@link

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2005, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -53,7 +53,7 @@ public interface DocumentationTool extends Tool, OptionChecker {
* use {@code System.err} if {@code null}
*
* @param fileManager a file manager; if {@code null} use the
* tool's standard filemanager
* tool's standard file manager
*
* @param diagnosticListener a diagnostic listener; if {@code null}
* use the tool's default method for reporting diagnostics
@ -117,7 +117,7 @@ public interface DocumentationTool extends Tool, OptionChecker {
* task has not yet started. To start the task, call
* the {@linkplain #call call} method.
*
* <p>Before calling the call method, additional aspects of the
* <p>Before calling the {@code call} method, additional aspects of the
* task can be configured, for example, by calling the
* {@linkplain #setLocale setLocale} method.
*/
@ -149,7 +149,7 @@ public interface DocumentationTool extends Tool, OptionChecker {
/**
* Performs this documentation task. The task may only
* be performed once. Subsequent calls to this method throw
* IllegalStateException.
* {@code IllegalStateException}.
*
* @return true if and only all the files were processed without errors;
* false otherwise
@ -161,6 +161,7 @@ public interface DocumentationTool extends Tool, OptionChecker {
*
* @throws IllegalStateException if called more than once
*/
@Override
Boolean call();
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2005, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -236,7 +236,7 @@ public interface JavaCompiler extends Tool, OptionChecker {
* @param out a Writer for additional output from the compiler;
* use {@code System.err} if {@code null}
* @param fileManager a file manager; if {@code null} use the
* compiler's standard filemanager
* compiler's standard file manager
* @param diagnosticListener a diagnostic listener; if {@code
* null} use the compiler's default method for reporting
* diagnostics
@ -290,7 +290,7 @@ public interface JavaCompiler extends Tool, OptionChecker {
* compilation task has not yet started. To start the task, call
* the {@linkplain #call call} method.
*
* <p>Before calling the call method, additional aspects of the
* <p>Before calling the {@code call} method, additional aspects of the
* task can be configured, for example, by calling the
* {@linkplain #setProcessors setProcessors} method.
*/
@ -331,7 +331,7 @@ public interface JavaCompiler extends Tool, OptionChecker {
/**
* Performs this compilation task. The compilation may only
* be performed once. Subsequent calls to this method throw
* IllegalStateException.
* {@code IllegalStateException}.
*
* @return true if and only all the files compiled without errors;
* false otherwise

View File

@ -98,7 +98,7 @@ public interface CaseTree extends Tree {
}
/**
* The syntatic form of this case:
* The syntactic form of this case:
* <ul>
* <li>STATEMENT: {@code case <expression>: <statements>}</li>
* <li>RULE: {@code case <expression> -> <expression>/<statement>}</li>

View File

@ -160,7 +160,7 @@ public abstract class JavacTask implements CompilationTask {
/**
* Returns a type mirror of the tree node determined by the specified path.
* This method has been superceded by methods on
* This method has been superseded by methods on
* {@link com.sun.source.util.Trees Trees}.
*
* @param path the path

View File

@ -73,11 +73,11 @@ import com.sun.tools.javac.util.JCDiagnostic;
*
* For each method, exceptions are handled as follows:
* <ul>
* <li>Checked exceptions are left alone and propogate upwards in the
* <li>Checked exceptions are left alone to propagate upwards in the
* obvious way, since they are an expected aspect of the method's
* specification.
* <li>Unchecked exceptions which have already been caught and wrapped in
* ClientCodeException are left alone to continue propogating upwards.
* ClientCodeException are left alone to continue propagating upwards.
* <li>All other unchecked exceptions (i.e. subtypes of RuntimeException
* and Error) and caught, and rethrown as a ClientCodeException with
* its cause set to the original exception.
@ -157,7 +157,7 @@ public class ClientCodeWrapper {
return fo;
}
public <T /*super JavaFileOject*/> DiagnosticListener<T> wrap(DiagnosticListener<T> dl) {
public <T /*super JavaFileObject*/> DiagnosticListener<T> wrap(DiagnosticListener<T> dl) {
if (isTrusted(dl))
return dl;
return new WrappedDiagnosticListener<>(dl);

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2015, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -129,7 +129,7 @@ public class JavacTaskPool {
* @param out a Writer for additional output from the compiler;
* use {@code System.err} if {@code null}
* @param fileManager a file manager; if {@code null} use the
* compiler's standard filemanager
* compiler's standard file manager
* @param diagnosticListener a diagnostic listener; if {@code
* null} use the compiler's default method for reporting
* diagnostics

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2009, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2009, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -223,7 +223,7 @@ public abstract class Directive implements ModuleElement.Directive {
}
/**
* 'provides' ServiceName 'with' QualifiedIdentifer ';'
* 'provides' ServiceName 'with' QualifiedIdentifier ';'
*/
public static class ProvidesDirective extends Directive
implements ModuleElement.ProvidesDirective {

View File

@ -360,7 +360,7 @@ public class Flags {
*/
public static final long UNINITIALIZED_FIELD= 1L<<51; // VarSymbols only
/** Flag is set for compiler-generated record members, it could be appplied to
/** Flag is set for compiler-generated record members, it could be applied to
* accessors and fields
*/
public static final int GENERATED_MEMBER = 1<<24; // MethodSymbols and VarSymbols

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2005, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -38,7 +38,7 @@ import com.sun.tools.javac.util.Options;
import com.sun.tools.javac.util.Pair;
/**
* A class for handling -Xlint suboptions and @SuppresssWarnings.
* A class for handling -Xlint suboptions and @SuppressWarnings.
*
* <p><b>This is NOT part of any supported API.
* If you write code that depends on this, you do so at your own risk.

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2009, 2014, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2009, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -57,7 +57,7 @@ public abstract class Printer implements Type.Visitor<String, Locale>, Symbol.Vi
protected Printer() { }
/**
* This method should be overriden in order to provide proper i18n support.
* This method should be overridden in order to provide proper i18n support.
*
* @param locale the locale in which the string is to be rendered
* @param key the key corresponding to the message to be displayed

View File

@ -477,7 +477,7 @@ public abstract class Type extends AnnoConstruct implements TypeMirror, PoolCons
/**
* The Java source which this type list represents. A List is
* represented as a comma-spearated listing of the elements in
* represented as a comma-separated listing of the elements in
* that list.
*/
public static String toString(List<Type> ts) {

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2014, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -35,9 +35,9 @@ import java.util.Set;
* TypeMetadata is essentially an immutable {@code EnumMap<Entry.Kind, <? extends Entry>>}
*
* A metadata class represented by a subtype of Entry can express a property on a Type instance.
* Thers should be at most one instance of an Entry per Entry.Kind on any given Type instance.
* There should be at most one instance of an Entry per Entry.Kind on any given Type instance.
*
* Metadata classes of a specific kind are responsible for how they combine themselvs.
* Metadata classes of a specific kind are responsible for how they combine themselves.
*
* @implNote {@code Entry:combine} need not be commutative.
*/

View File

@ -223,7 +223,7 @@ public class Types {
* A downwards projection maps a type T into a type S such that (i) T has no variables in V,
* and (ii) S is a lower bound of T.
*
* Note that projections are only allowed to touch variables in V. Theferore it is possible for
* Note that projections are only allowed to touch variables in V. Therefore, it is possible for
* a projection to leave its input type unchanged if it does not contain any variables in V.
*
* Moreover, note that while an upwards projection is always defined (every type as an upper bound),

View File

@ -424,7 +424,7 @@ public class Annotate {
public Attribute.Compound attributeAnnotation(JCAnnotation tree, Type expectedAnnotationType,
Env<AttrContext> env)
{
// The attribute might have been entered if it is Target or Repetable
// The attribute might have been entered if it is Target or Repeatable
// Because TreeCopier does not copy type, redo this if type is null
if (tree.attribute != null && tree.type != null)
return tree.attribute;
@ -445,7 +445,7 @@ public class Annotate {
public Attribute.TypeCompound attributeTypeAnnotation(JCAnnotation a, Type expectedAnnotationType,
Env<AttrContext> env)
{
// The attribute might have been entered if it is Target or Repetable
// The attribute might have been entered if it is Target or Repeatable
// Because TreeCopier does not copy type, redo this if type is null
if (a.attribute == null || a.type == null || !(a.attribute instanceof Attribute.TypeCompound)) {
// Create a new TypeCompound
@ -540,7 +540,7 @@ public class Annotate {
private Attribute attributeAnnotationValue(Type expectedElementType, JCExpression tree,
Env<AttrContext> env)
{
//first, try completing the symbol for the annotation value - if acompletion
//first, try completing the symbol for the annotation value - if a completion
//error is thrown, we should recover gracefully, and display an
//ordinary resolution diagnostic.
try {
@ -1127,7 +1127,7 @@ public class Annotate {
@Override
public void visitBindingPattern(JCTree.JCBindingPattern tree) {
//type binding pattern's type will be annotated separatelly, avoid
//type binding pattern's type will be annotated separately, avoid
//adding its annotations into the owning method here (would clash
//with repeatable annotations).
}
@ -1164,7 +1164,7 @@ public class Annotate {
};
/* Last stage completer to enter just enough annotations to have a prototype annotation type.
* This currently means entering @Target and @Repetable.
* This currently means entering @Target and @Repeatable.
*/
public AnnotationTypeCompleter annotationTypeSourceCompleter() {
return theSourceCompleter;

View File

@ -91,7 +91,7 @@ import com.sun.tools.javac.tree.JCTree.JCYield;
* type, so that enclosing overload resolution can be carried by simply checking compatibility against the
* type determined during this speculative pass.
*
* - if A is a standalone expression, regular atributtion takes place.
* - if A is a standalone expression, regular attribution takes place.
*
* To minimize the speculative work, a cache is used, so that already computed argument types
* associated with a given unique source location are never recomputed multiple times.
@ -112,7 +112,7 @@ public class ArgumentAttr extends JCTree.Visitor {
/** Result of method attribution. */
Type result;
/** Cache for argument types; behavior is influences by the currrently selected cache policy. */
/** Cache for argument types; behavior is influenced by the currently selected cache policy. */
Map<UniquePos, ArgumentType<?>> argumentTypeCache = new LinkedHashMap<>();
public static ArgumentAttr instance(Context context) {

View File

@ -1490,7 +1490,7 @@ public class Attr extends JCTree.Visitor {
env.dup(env.tree, env.info.dup(env.info.scope.dup()));
try {
//the Formal Parameter of a for-each loop is not in the scope when
//attributing the for-each expression; we mimick this by attributing
//attributing the for-each expression; we mimic this by attributing
//the for-each expression first (against original scope).
Type exprType = types.cvarUpperBound(attribExpr(tree.expr, loopEnv));
chk.checkNonVoid(tree.pos(), exprType);
@ -3466,7 +3466,7 @@ public class Attr extends JCTree.Visitor {
if (!env.info.attributionMode.isSpeculative && that.getMode() == JCMemberReference.ReferenceMode.NEW) {
Type enclosingType = exprType.getEnclosingType();
if (enclosingType != null && enclosingType.hasTag(CLASS)) {
// Check for the existence of an apropriate outer instance
// Check for the existence of an appropriate outer instance
rs.resolveImplicitThis(that.pos(), env, exprType);
}
}
@ -4197,7 +4197,7 @@ public class Attr extends JCTree.Visitor {
case TYPEVAR:
// Normally, site.getUpperBound() shouldn't be null.
// It should only happen during memberEnter/attribBase
// when determining the super type which *must* beac
// when determining the super type which *must* be
// done before attributing the type variables. In
// other words, we are seeing this illegal program:
// class B<T> extends A<T.foo> {}
@ -5170,7 +5170,7 @@ public class Attr extends JCTree.Visitor {
checkSerialVersionUID(tree, c);
}
if (allowTypeAnnos) {
// Correctly organize the postions of the type annotations
// Correctly organize the positions of the type annotations
typeAnnotations.organizeTypeAnnotationsBodies(tree);
// Check type annotations applicability rules
@ -5480,7 +5480,7 @@ public class Attr extends JCTree.Visitor {
* the compiler has encountered some errors (which might have ended up
* terminating attribution abruptly); if the compiler is used in fail-over
* mode (e.g. by an IDE) and the AST contains semantic errors, this routine
* prevents NPE to be progagated during subsequent compilation steps.
* prevents NPE to be propagated during subsequent compilation steps.
*/
public void postAttr(JCTree tree) {
new PostAttrAnalyzer().scan(tree);

View File

@ -1299,9 +1299,9 @@ public class Check {
/** Determine if this enum should be implicitly final.
*
* If the enum has no specialized enum contants, it is final.
* If the enum has no specialized enum constants, it is final.
*
* If the enum does have specialized enum contants, it is
* If the enum does have specialized enum constants, it is
* <i>not</i> final.
*/
private long implicitEnumFinalFlag(JCTree tree) {
@ -1861,7 +1861,7 @@ public class Check {
// because in that case, we will rediscover the issue when examining the method
// in the supertype.
// If the method, m, is not defined in an interface, then the only time we need to
// address the issue is when the method is the supertype implemementation: any other
// address the issue is when the method is the supertype implementation: any other
// case, we will have dealt with when examining the supertype classes
ClassSymbol mc = m.enclClass();
Type st = types.supertype(origin.type);
@ -1952,7 +1952,7 @@ public class Check {
* @param t1 The first type.
* @param t2 The second type.
* @param site The most derived type.
* @returns symbol from t2 that conflicts with one in t1.
* @return symbol from t2 that conflicts with one in t1.
*/
private Symbol firstIncompatibility(DiagnosticPosition pos, Type t1, Type t2, Type site) {
Map<TypeSymbol,Type> interfaces1 = new HashMap<>();
@ -1982,7 +1982,7 @@ public class Check {
}
}
/** Compute all the supertypes of t, indexed by type symbol (except thise in typesSkip). */
/** Compute all the supertypes of t, indexed by type symbol (except those in typesSkip). */
private void closure(Type t, Map<TypeSymbol,Type> typesSkip, Map<TypeSymbol,Type> typeMap) {
if (!t.hasTag(CLASS)) return;
if (typesSkip.get(t.tsym) != null) return;
@ -2678,7 +2678,7 @@ public class Check {
}
if (potentiallyAmbiguous) {
//we found two incompatible functional interfaces with same arity
//this means a call site passing an implicit lambda would be ambigiuous
//this means a call site passing an implicit lambda would be ambiguous
msym1.flags_field |= POTENTIALLY_AMBIGUOUS;
msym2.flags_field |= POTENTIALLY_AMBIGUOUS;
log.warning(LintCategory.OVERLOADS, pos,
@ -3276,7 +3276,7 @@ public class Check {
return true;
} else if (target == names.TYPE_USE) {
if (s.kind == VAR && s.owner.kind == MTH && s.type.hasTag(NONE)) {
//cannot type annotate implictly typed locals
//cannot type annotate implicitly typed locals
return false;
} else if (s.kind == TYP || s.kind == VAR ||
(s.kind == MTH && !s.isConstructor() &&
@ -3607,7 +3607,7 @@ public class Check {
} else if ((sym.flags() & MATCH_BINDING) != 0 &&
(byName.flags() & MATCH_BINDING) != 0 &&
(byName.flags() & MATCH_BINDING_TO_OUTER) == 0) {
//this error will be reported separatelly in MatchBindingsComputer
//this error will be reported separately in MatchBindingsComputer
return false;
} else {
duplicateError(pos, byName);

View File

@ -618,7 +618,7 @@ public class DeferredAttr extends JCTree.Visitor {
inferenceContext.notifyChange();
} catch (Infer.GraphStrategy.NodeNotFoundException ex) {
//this means that we are in speculative mode and the
//set of contraints are too tight for progess to be made.
//set of constraints are too tight for progress to be made.
//Just leave the remaining expressions as stuck.
break;
}

View File

@ -137,7 +137,7 @@ import static com.sun.tools.javac.tree.JCTree.Tag.*;
* return statement" iff V is DA before the return statement or V is
* DA at the end of any intervening finally block. Note that we
* don't have to worry about the return expression because this
* concept is only used for construcrors.
* concept is only used for constructors.
*
* <p>There is no spec in the JLS for when a variable is definitely
* assigned at the end of a constructor, which is needed for final
@ -223,7 +223,7 @@ public class Flow {
Log.DiagnosticHandler diagHandler = null;
//we need to disable diagnostics temporarily; the problem is that if
//a lambda expression contains e.g. an unreachable statement, an error
//message will be reported and will cause compilation to skip the flow analyis
//message will be reported and will cause compilation to skip the flow analysis
//step - if we suppress diagnostics, we won't stop at Attr for flow-analysis
//related errors, which will allow for more errors to be detected
if (!speculative) {
@ -242,7 +242,7 @@ public class Flow {
JCLambda that, TreeMaker make) {
//we need to disable diagnostics temporarily; the problem is that if
//a lambda expression contains e.g. an unreachable statement, an error
//message will be reported and will cause compilation to skip the flow analyis
//message will be reported and will cause compilation to skip the flow analysis
//step - if we suppress diagnostics, we won't stop at Attr for flow-analysis
//related errors, which will allow for more errors to be detected
Log.DiagnosticHandler diagHandler = new Log.DiscardDiagnosticHandler(log);
@ -259,7 +259,7 @@ public class Flow {
public boolean aliveAfter(Env<AttrContext> env, JCTree that, TreeMaker make) {
//we need to disable diagnostics temporarily; the problem is that if
//"that" contains e.g. an unreachable statement, an error
//message will be reported and will cause compilation to skip the flow analyis
//message will be reported and will cause compilation to skip the flow analysis
//step - if we suppress diagnostics, we won't stop at Attr for flow-analysis
//related errors, which will allow for more errors to be detected
Log.DiagnosticHandler diagHandler = new Log.DiscardDiagnosticHandler(log);
@ -276,7 +276,7 @@ public class Flow {
public boolean breaksOutOf(Env<AttrContext> env, JCTree loop, JCTree body, TreeMaker make) {
//we need to disable diagnostics temporarily; the problem is that if
//"that" contains e.g. an unreachable statement, an error
//message will be reported and will cause compilation to skip the flow analyis
//message will be reported and will cause compilation to skip the flow analysis
//step - if we suppress diagnostics, we won't stop at Attr for flow-analysis
//related errors, which will allow for more errors to be detected
Log.DiagnosticHandler diagHandler = new Log.DiscardDiagnosticHandler(log);
@ -1310,7 +1310,7 @@ public class Flow {
log.error(pos, Errors.ExceptNeverThrownInTry(exc));
} else {
List<Type> catchableThrownTypes = chk.intersect(List.of(exc), thrownInTry);
// 'catchableThrownTypes' cannnot possibly be empty - if 'exc' was an
// 'catchableThrownTypes' cannot possibly be empty - if 'exc' was an
// unchecked exception, the result list would not be empty, as the augmented
// thrown set includes { RuntimeException, Error }; if 'exc' was a checked
// exception, that would have been covered in the branch above

View File

@ -279,7 +279,7 @@ public class Infer {
}
/**
* A partially infered method/constructor type; such a type can be checked multiple times
* A partially inferred method/constructor type; such a type can be checked multiple times
* against different targets.
*/
public class PartiallyInferredMethodType extends MethodType {
@ -306,7 +306,7 @@ public class Infer {
/**
* Checks this type against a target; this means generating return type constraints, solve
* and then roll back the results (to avoid poolluting the context).
* and then roll back the results (to avoid polluting the context).
*/
Type check(Attr.ResultInfo resultInfo) {
Warner noWarnings = new Warner(null);
@ -1621,10 +1621,10 @@ public class Infer {
/** stuck dependency */
STUCK("dashed");
final String dotSyle;
final String dotStyle;
private DependencyKind(String dotSyle) {
this.dotSyle = dotSyle;
private DependencyKind(String dotStyle) {
this.dotStyle = dotStyle;
}
}
@ -1829,7 +1829,7 @@ public class Infer {
@Override
public Properties dependencyAttributes(Node sink, GraphUtils.DependencyKind dk) {
Properties p = new Properties();
p.put("style", ((DependencyKind)dk).dotSyle);
p.put("style", ((DependencyKind)dk).dotStyle);
StringBuilder buf = new StringBuilder();
String sep = "";
for (Type from : data) {

View File

@ -381,7 +381,7 @@ public class LambdaToMethod extends TreeTranslator {
//translate lambda body
//As the lambda body is translated, all references to lambda locals,
//captured variables, enclosing members are adjusted accordingly
//to refer to the static method parameters (rather than i.e. acessing to
//to refer to the static method parameters (rather than i.e. accessing
//captured members directly).
lambdaDecl.body = translate(makeLambdaBody(tree, lambdaDecl));
@ -963,7 +963,7 @@ public class LambdaToMethod extends TreeTranslator {
// are used as pointers to the current parameter type information
// and are thus not usable afterwards.
for (int i = 0; implPTypes.nonEmpty() && i < last; ++i) {
// By default use the implementation method parmeter type
// By default use the implementation method parameter type
Type parmType = implPTypes.head;
// If the unerased parameter type is a type variable whose
// bound is an intersection (eg. <T extends A & B>) then

View File

@ -801,7 +801,7 @@ public class Lower extends TreeTranslator {
/** Anon inner classes are used as access constructor tags.
* accessConstructorTag will use an existing anon class if one is available,
* and synthethise a class (with makeEmptyClass) if one is not available.
* and synthesize a class (with makeEmptyClass) if one is not available.
* However, there is a small possibility that an existing class will not
* be generated as expected if it is inside a conditional with a constant
* expression. If that is found to be the case, create an empty class tree here.
@ -1337,7 +1337,7 @@ public class Lower extends TreeTranslator {
JCExpression site = make.Ident(md.params.head);
if (acode % 2 != 0) {
//odd access codes represent qualified super accesses - need to
//emit reference to the direct superclass, even if the refered
//emit reference to the direct superclass, even if the referred
//member is from an indirect superclass (JLS 13.1)
site.setType(types.erasure(types.supertype(vsym.owner.enclClass().type)));
}

View File

@ -1160,7 +1160,7 @@ public class Modules extends JCTree.Visitor {
*/
PackageSymbol implementationDefiningPackage = impl.packge();
if (implementationDefiningPackage.modle != msym) {
// TODO: should use tree for the implentation name, not the entire provides tree
// TODO: should use tree for the implementation name, not the entire provides tree
// TODO: should improve error message to identify the implementation type
log.error(tree.pos(), Errors.ServiceImplementationNotInRightModule(implementationDefiningPackage.modle));
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2015, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -229,7 +229,7 @@ public class Operators {
/**
* The constants in this enum represent the types upon which all the operator helpers
* operate upon. This allows lazy and consise mapping between a type name and a type instance.
* operate upon. This allows lazy and concise mapping between a type name and a type instance.
*/
enum OperatorType {
BYTE(syms -> syms.byteType),
@ -280,7 +280,7 @@ public class Operators {
/**
* This routine implements the main operator lookup process. Each operator is tested
* using an applicability predicate; if the test suceeds that same operator is returned,
* using an applicability predicate; if the test succeeds that same operator is returned,
* otherwise a dummy symbol is returned.
*/
final OperatorSymbol doLookup(Predicate<OperatorSymbol> applicabilityTest) {

View File

@ -296,7 +296,7 @@ public class Resolve {
(owner.flags() & STATIC) == 0;
}
/** Is class accessible in given evironment?
/** Is class accessible in given environment?
* @param env The current environment.
* @param c The class whose accessibility is checked.
*/
@ -3224,7 +3224,7 @@ public class Resolve {
@Override
ReferenceLookupResult unboundResult(ReferenceLookupResult boundRes, ReferenceLookupResult unboundRes) {
if (boundRes.isSuccess() && !boundRes.hasKind(StaticKind.NON_STATIC)) {
//the first serach has at least one applicable static method
//the first search has at least one applicable static method
return boundRes;
} else if (unboundRes.isSuccess() && !unboundRes.hasKind(StaticKind.STATIC)) {
//the second search has at least one applicable non-static method
@ -4587,7 +4587,7 @@ public class Resolve {
*/
interface DiagnosticRewriter {
JCDiagnostic rewriteDiagnostic(JCDiagnostic.Factory diags,
DiagnosticPosition preferedPos, DiagnosticSource preferredSource,
DiagnosticPosition preferredPos, DiagnosticSource preferredSource,
DiagnosticType preferredKind, JCDiagnostic d);
}
@ -4643,12 +4643,12 @@ public class Resolve {
@Override
public JCDiagnostic rewriteDiagnostic(JCDiagnostic.Factory diags,
DiagnosticPosition preferedPos, DiagnosticSource preferredSource,
DiagnosticPosition preferredPos, DiagnosticSource preferredSource,
DiagnosticType preferredKind, JCDiagnostic d) {
JCDiagnostic cause = (JCDiagnostic)d.getArgs()[causeIndex];
DiagnosticPosition pos = d.getDiagnosticPosition();
if (pos == null) {
pos = preferedPos;
pos = preferredPos;
}
return diags.create(preferredKind, preferredSource, pos,
"prob.found.req", cause);

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2009, 2016, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2009, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -66,7 +66,7 @@ import com.sun.tools.javac.util.Log;
import com.sun.tools.javac.util.Options;
/**
* Utility methods for building a filemanager.
* Utility methods for building a file manager.
* There are no references here to file-system specific objects such as
* java.io.File or java.nio.file.Path.
*/
@ -92,7 +92,7 @@ public abstract class BaseFileManager implements JavaFileManager {
// Setting this option is an indication that close() should defer actually closing
// the file manager until after a specified period of inactivity.
// This is to accomodate clients which save references to Symbols created for use
// This is to accommodate clients which save references to Symbols created for use
// within doclets or annotation processors, and which then attempt to use those
// references after the tool exits, having closed any internally managed file manager.
// Ideally, such clients should run the tool via the javax.tools API, providing their

View File

@ -1247,7 +1247,7 @@ public class JavacFileManager extends BaseFileManager implements StandardJavaFil
* Get a detail message from an IOException.
* Most, but not all, instances of IOException provide a non-null result
* for getLocalizedMessage(). But some instances return null: in these
* cases, fallover to getMessage(), and if even that is null, return the
* cases, fall back to getMessage(), and if even that is null, return the
* name of the exception itself.
* @param e an IOException
* @return a string to include in a compiler diagnostic

View File

@ -979,7 +979,7 @@ public class Locations {
}
/**
* A LocationHander to represent modules found from a module-oriented
* A LocationHandler to represent modules found from a module-oriented
* location such as MODULE_SOURCE_PATH, UPGRADE_MODULE_PATH,
* SYSTEM_MODULES and MODULE_PATH.
*

View File

@ -234,7 +234,7 @@ public class ClassReader {
CompoundAnnotationProxy target;
/**
* The prototype @Repetable Attribute.Compound if this class is an annotation annotated with
* The prototype @Repeatable Attribute.Compound if this class is an annotation annotated with
* @Repeatable
*/
CompoundAnnotationProxy repeatable;
@ -876,8 +876,8 @@ public class ClassReader {
// Parameter names are not explicitly identified as such,
// but all parameter name entries in the LocalVariableTable
// have a start_pc of 0. Therefore, we record the name
// indicies of all slots with a start_pc of zero in the
// parameterNameIndicies array.
// indices of all slots with a start_pc of zero in the
// parameterNameIndices array.
// Note that this implicitly honors the JVMS spec that
// there may be more than one LocalVariableTable, and that
// there is no specified ordering for the entries.
@ -998,7 +998,7 @@ public class ClassReader {
}
},
// additional "legacy" v49 attributes, superceded by flags
// additional "legacy" v49 attributes, superseded by flags
new AttributeReader(names.Annotation, V49, CLASS_OR_MEMBER_ATTRIBUTE) {
protected void read(Symbol sym, int attrLen) {

View File

@ -282,7 +282,7 @@ public class Gen extends JCTree.Visitor {
}
}
/** Create a tempory variable.
/** Create a temporary variable.
* @param type The variable's type.
*/
LocalItem makeTemp(Type type) {
@ -1108,7 +1108,7 @@ public class Gen extends JCTree.Visitor {
/** Generate code for a loop.
* @param loop The tree representing the loop.
* @param body The loop's body.
* @param cond The loop's controling condition.
* @param cond The loop's controlling condition.
* @param step "Step" statements to be inserted at end of
* each iteration.
* @param testFirst True if the loop test belongs before the body.
@ -1522,7 +1522,7 @@ public class Gen extends JCTree.Visitor {
endFinalizerGap(env);
}
if (hasFinalizer) {
// Create a new register segement to avoid allocating
// Create a new register segment to avoid allocating
// the same variables in finalizers and other statements.
code.newRegSegment();

View File

@ -174,9 +174,9 @@ public class Items {
/** Make an item representing a conditional or unconditional jump.
* @param opcode The jump's opcode.
* @param trueJumps A chain encomassing all jumps that can be taken
* @param trueJumps A chain encompassing all jumps that can be taken
* if the condition evaluates to true.
* @param falseJumps A chain encomassing all jumps that can be taken
* @param falseJumps A chain encompassing all jumps that can be taken
* if the condition evaluates to false.
*/
CondItem makeCondItem(int opcode, Chain trueJumps, Chain falseJumps) {
@ -754,12 +754,12 @@ public class Items {
*/
class CondItem extends Item {
/** A chain encomassing all jumps that can be taken
/** A chain encompassing all jumps that can be taken
* if the condition evaluates to true.
*/
Chain trueJumps;
/** A chain encomassing all jumps that can be taken
/** A chain encompassing all jumps that can be taken
* if the condition evaluates to false.
*/
Chain falseJumps;

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1999, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1999, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -195,7 +195,7 @@ public class JNIWriter {
out = null;
} finally {
if (out != null) {
// if we are propogating an exception, delete the file
// if we are propagating an exception, delete the file
out.close();
outFile.delete();
outFile = null;

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1999, 2016, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1999, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -105,7 +105,7 @@ public class ModuleNameReader {
throw new BadClassFile("invalid access flags for module: 0x" + Integer.toHexString(access_flags));
int this_class = nextChar();
// could, should, check this_class == CONSTANT_Class("mdoule-info")
// could, should, check this_class == CONSTANT_Class("module-info")
checkZero(nextChar(), "super_class");
checkZero(nextChar(), "interface_count");
checkZero(nextChar(), "fields_count");

View File

@ -199,7 +199,7 @@ public interface PoolConstant {
}
/**
* A pool constant implememntation describing a name and type pool entry.
* A pool constant implementation describing a name and type pool entry.
*/
final class NameAndType implements PoolConstant {

View File

@ -238,7 +238,7 @@ public class PoolWriter {
return s.kind == Kind.MTH ? s.externalType(types) : s.erasure(types);
}
private int makeBoostrapEntry(Dynamic dynamic) {
private int makeBootstrapEntry(Dynamic dynamic) {
BsmKey bsmKey = dynamic.bsmKey(types);
// Figure out the index for existing BSM; create a new BSM if no key
@ -455,14 +455,14 @@ public class PoolWriter {
case ClassFile.CONSTANT_InvokeDynamic: {
DynamicMethodSymbol d = (DynamicMethodSymbol)c;
poolbuf.appendByte(tag);
poolbuf.appendChar(makeBoostrapEntry(d));
poolbuf.appendChar(makeBootstrapEntry(d));
poolbuf.appendChar(putNameAndType(d));
break;
}
case ClassFile.CONSTANT_Dynamic: {
Symbol.DynamicVarSymbol d = (Symbol.DynamicVarSymbol)c;
poolbuf.appendByte(tag);
poolbuf.appendChar(makeBoostrapEntry(d));
poolbuf.appendChar(makeBootstrapEntry(d));
poolbuf.appendChar(putNameAndType(d));
break;
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2018, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -477,7 +477,7 @@ public class Main {
}
/**
* An object to encapulate the set of in-memory classes, such that
* An object to encapsulate the set of in-memory classes, such that
* they can be written by a file manager and subsequently used by
* a class loader.
*/

View File

@ -1490,7 +1490,7 @@ public class JavaCompiler {
} finally {
/*
* ignore any updates to hasLambdas made during
* the nested scan, this ensures an initalized
* the nested scan, this ensures an initialized
* LambdaToMethod is available only to those
* classes that contain lambdas
*/

View File

@ -184,7 +184,7 @@ public enum Option {
SOURCE_PATH("--source-path -sourcepath", "opt.arg.path", "opt.sourcepath", STANDARD, FILEMANAGER),
MODULE_SOURCE_PATH("--module-source-path", "opt.arg.mspath", "opt.modulesourcepath", STANDARD, FILEMANAGER) {
// The deferred filemanager diagnostics mechanism assumes a single value per option,
// The deferred file manager diagnostics mechanism assumes a single value per option,
// but --module-source-path-module can be used multiple times, once in the old form
// and once per module in the new form. Therefore we compose an overall value for the
// option containing the individual values given on the command line, separated by NULL.
@ -233,7 +233,7 @@ public enum Option {
SYSTEM("--system", "opt.arg.jdk", "opt.system", STANDARD, FILEMANAGER),
PATCH_MODULE("--patch-module", "opt.arg.patch", "opt.patch", EXTENDED, FILEMANAGER) {
// The deferred filemanager diagnostics mechanism assumes a single value per option,
// The deferred file manager diagnostics mechanism assumes a single value per option,
// but --patch-module can be used multiple times, once per module. Therefore we compose
// a value for the option containing the last value specified for each module, and separate
// the module=path pairs by an invalid path character, NULL.

View File

@ -321,7 +321,7 @@ public class AnnotationProxyMaker {
/**
* ExceptionProxy for MirroredTypesException.
* The toString, hashCode, and equals methods foward to the underlying
* The toString, hashCode, and equals methods forward to the underlying
* types.
*/
private static final class MirroredTypesExceptionProxy extends ExceptionProxy {

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1999, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1999, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -392,7 +392,7 @@ public class JavaTokenizer {
return reader.ch == CR && reader.peekChar() == LF;
}
/** Count and skip repeated occurances of the specified character.
/** Count and skip repeated occurrences of the specified character.
*/
private int countChar(char ch, int max) {
int count = 0;

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2005, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -60,7 +60,7 @@ public interface Lexer {
Token prevToken();
/**
* Splits the current token in two and return the first (splitted) token.
* Splits the current token in two and return the first (split) token.
* For instance {@literal '<<<'} is split into two tokens
* {@literal '<'} and {@literal '<<'} respectively,
* and the latter is returned.

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2005, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2005, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -882,7 +882,7 @@ public class JavacFiler implements Filer, Closeable {
*/
if ((typeName != null)) {
if (!(fileObject instanceof JavaFileObject))
throw new AssertionError("JavaFileOject not found for " + fileObject);
throw new AssertionError("JavaFileObject not found for " + fileObject);
JavaFileObject javaFileObject = (JavaFileObject)fileObject;
switch(javaFileObject.getKind()) {
case SOURCE:

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2005, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -95,7 +95,7 @@ public class JavacMessager implements Messager {
* @param kind the kind of message
* @param msg the message, or an empty string if none
* @param e the annotated element
* @param a the annotation containing the annotaiton value
* @param a the annotation containing the annotation value
* @param v the annotation value to use as a position hint
*/
@DefinedBy(Api.ANNOTATION_PROCESSING)

View File

@ -807,20 +807,20 @@ public class JavacProcessingEnvironment implements ProcessingEnvironment, Closea
class ProcessorStateIterator implements Iterator<ProcessorState> {
DiscoveredProcessors psi;
Iterator<ProcessorState> innerIter;
boolean onProcInterator;
boolean onProcIterator;
ProcessorStateIterator(DiscoveredProcessors psi) {
this.psi = psi;
this.innerIter = psi.procStateList.iterator();
this.onProcInterator = false;
this.onProcIterator = false;
}
public ProcessorState next() {
if (!onProcInterator) {
if (!onProcIterator) {
if (innerIter.hasNext())
return innerIter.next();
else
onProcInterator = true;
onProcIterator = true;
}
if (psi.processorIterator.hasNext()) {
@ -836,7 +836,7 @@ public class JavacProcessingEnvironment implements ProcessingEnvironment, Closea
}
public boolean hasNext() {
if (onProcInterator)
if (onProcIterator)
return psi.processorIterator.hasNext();
else
return innerIter.hasNext() || psi.processorIterator.hasNext();
@ -852,7 +852,7 @@ public class JavacProcessingEnvironment implements ProcessingEnvironment, Closea
* annotations.
*/
public void runContributingProcs(RoundEnvironment re) {
if (!onProcInterator) {
if (!onProcIterator) {
Set<TypeElement> emptyTypeElements = Collections.emptySet();
while(innerIter.hasNext()) {
ProcessorState ps = innerIter.next();
@ -1161,7 +1161,7 @@ public class JavacProcessingEnvironment implements ProcessingEnvironment, Closea
}
/** Return the number of errors found so far in this round.
* This may include uncoverable errors, such as parse errors,
* This may include unrecoverable errors, such as parse errors,
* and transient errors, such as missing symbols. */
int errorCount() {
return compiler.errorCount();

View File

@ -3526,7 +3526,7 @@ compiler.err.record.header.expected=\
record header expected
############################################
# messages previouly at javac.properties
# messages previously at javac.properties
compiler.err.empty.A.argument=\
-A requires an argument; use ''-Akey'' or ''-Akey=value''

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -221,7 +221,7 @@ public class DocTreeMaker implements DocTreeFactory {
}
/*
* Primarily to produce a DocCommenTree when given a
* Primarily to produce a DocCommentTree when given a
* first sentence and a body, this is useful, in cases
* where the trees are being synthesized by a tool.
*/

View File

@ -158,7 +158,7 @@ public abstract class JCTree implements Tree, Cloneable, DiagnosticPosition {
*/
SWITCH_EXPRESSION,
/** Synchronized statements, of type Synchonized.
/** Synchronized statements, of type Synchronized.
*/
SYNCHRONIZED,

View File

@ -170,7 +170,7 @@ public class Pretty extends JCTree.Visitor {
* Traversal methods
*************************************************************************/
/** Exception to propogate IOException through visitXXX methods */
/** Exception to propagate IOException through visitXXX methods */
private static class UncheckedIOException extends Error {
static final long serialVersionUID = -4032692679158424751L;
UncheckedIOException(IOException e) {

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2008, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2008, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -61,7 +61,7 @@ import static com.sun.tools.javac.util.JCDiagnostic.DiagnosticType.*;
* by any formatter used by javac. Among the main features provided by AbstractDiagnosticFormatter are:
*
* <ul>
* <li> Provides a standard implementation of the visitor-like methods defined in the interface DiagnisticFormatter.
* <li> Provides a standard implementation of the visitor-like methods defined in the interface DiagnosticFormatter.
* Those implementations are specifically targeting JCDiagnostic objects.
* <li> Provides basic support for i18n and a method for executing all locale-dependent conversions
* <li> Provides the formatting logic for rendering the arguments of a JCDiagnostic object.
@ -85,7 +85,7 @@ public abstract class AbstractDiagnosticFormatter implements DiagnosticFormatter
private SimpleConfiguration config;
/**
* Current depth level of the disgnostic being formatted
* Current depth level of the diagnostic being formatted
* (!= 0 for subdiagnostics)
*/
protected int depth = 0;

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2005, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -26,7 +26,7 @@
package com.sun.tools.javac.util;
/**
* An exception used for propogating exceptions found in client code
* An exception used for propagating exceptions found in client code
* invoked from javac.
*
* <p><b>This is NOT part of any supported API.

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2001, 2014, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2001, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -59,7 +59,7 @@ import java.util.*;
*
* protected Phase(Context context) {
* context.put(phaseKey, this);
* // other intitialization follows...
* // other initialization follows...
* }
* }
* }</pre>

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1999, 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1999, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -41,7 +41,7 @@ package com.sun.tools.javac.util;
* <li><a href="http://docs.oracle.com/javase/7/docs/api/java/io/DataInput.html#modified-utf-8">
java.io.DataInput: Modified UTF-8 </a></li>
<li><a href="https://en.wikipedia.org/wiki/UTF-8#Modified_UTF-8">
Modified UTF-8 (wikipedia) </a></li>
Modified UTF-8 (Wikipedia) </a></li>
* </ul>
*
* The methods here support modified UTF-8.

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2009, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -104,7 +104,7 @@ public class ForwardingDiagnosticFormatter<D extends Diagnostic<?>, F extends Di
*/
public static class ForwardingConfiguration implements DiagnosticFormatter.Configuration {
/** The configurationr object to which the forwarding configuration delegates some settings */
/** The configuration object to which the forwarding configuration delegates some settings */
protected Configuration configuration;
public ForwardingConfiguration(Configuration configuration) {

View File

@ -28,7 +28,7 @@ package com.sun.tools.javac.util;
import java.util.Set;
/**
* Access to the compiler's name table. STandard names are defined,
* Access to the compiler's name table. Standard names are defined,
* as well as methods to create new names.
*
* <p><b>This is NOT part of any supported API.

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2001, 2016, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2001, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -56,7 +56,7 @@ public class Options {
}
protected Options(Context context) {
// DEBUGGING -- Use LinkedHashMap for reproducability
// DEBUGGING -- Use LinkedHashMap for reproducibility
values = new LinkedHashMap<>();
context.put(optionsKey, this);
}

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1999, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -36,7 +36,7 @@ import static com.sun.tools.javac.util.LayoutCharacters.*;
* is at position 0.
*
* Support is also provided for (line,column) coordinates, but tab
* expansion is optional and no Unicode excape translation is considered.
* expansion is optional and no Unicode escape translation is considered.
* The first character is at location (1,1).
*
* <p><b>This is NOT part of any supported API.

View File

@ -51,8 +51,8 @@ import static com.sun.tools.javac.util.RichDiagnosticFormatter.RichConfiguration
/**
* A rich diagnostic formatter is a formatter that provides better integration
* with javac's type system. A diagostic is first preprocessed in order to keep
* track of each types/symbols in it; after these informations are collected,
* with javac's type system. A diagnostic is first preprocessed in order to keep
* track of each types/symbols in it; after this information is collected,
* the diagnostic is rendered using a standard formatter, whose type/symbol printer
* has been replaced by a more refined version provided by this rich formatter.
* The rich formatter currently enables three different features: (i) simple class
@ -250,7 +250,7 @@ public class RichDiagnosticFormatter extends
}
//where
/**
* This enum defines all posssible kinds of where clauses that can be
* This enum defines all possible kinds of where clauses that can be
* attached by a rich diagnostic formatter to a given diagnostic
*/
enum WhereClauseKind {

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2012, 2016, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -179,7 +179,7 @@ public class CompileJavaPackages implements Transformer {
// Ouch it does not fit. Reduce to a single chunk.
numCompiles = 1;
sourcesPerCompile = numSources;
// What if the relationship betweem number of compile_chunks and num_required_mbytes
// What if the relationship between number of compile_chunks and num_required_mbytes
// is not linear? Then perhaps 2 chunks would fit where 3 does not. Well, this is
// something to experiment upon in the future.
Log.debug("Limiting compile to a single thread to stay within heap size limitations!");

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2012, 2016, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -95,7 +95,7 @@ public class JavacState {
// A module dependency can occur directly through a require, or
// indirectly through a module that does a public export for the first tainted module.
// When all modules are tainted, then taint all packages belonging to these modules.
// Then rebuild. It is perhaps possible (and valuable?) to do a more finegrained examination of the
// Then rebuild. It is perhaps possible (and valuable?) to do a more fine-grained examination of the
// change in module-info.java, but that will have to wait.
private Set<String> taintedModules;
// The set of all packages that has been recompiled.

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2012, 2016, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -181,7 +181,7 @@ public class Source implements Comparable<Source> {
}
/**
* Recurse into the directory root and find all files matchine the excl/incl/exclfiles/inclfiles rules.
* Recurse into the directory root and find all files matching the excl/incl/exclfiles/inclfiles rules.
* Detects the existence of module-info.java files and presumes that the directory it resides in
* is the name of the current module.
*/
@ -227,7 +227,7 @@ public class Source implements Comparable<Source> {
existing = currentModule.lookupSource(file.toString());
if (existing != null) {
// Oups, the source is already added, could be ok, could be not, lets check.
// Oops, the source is already added, could be ok, could be not, let's check.
if (inLinksrc) {
// So we are collecting sources for linking only.
if (existing.isLinkedOnly()) {

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2014, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -173,7 +173,7 @@ public class SjavacClient implements Sjavac {
}
/*
* Makes MAX_CONNECT_ATTEMPTS attepmts to connect to server.
* Makes MAX_CONNECT_ATTEMPTS attempts to connect to server.
*/
private Socket tryConnect() throws IOException, InterruptedException {
makeSureServerIsRunning(portFile);

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2012, 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -50,7 +50,7 @@ import com.sun.tools.javac.util.ListBuffer;
* Traps writes to certain files, if the content written is identical
* to the existing file.
*
* Can also blind out the filemanager from seeing certain files in the file system.
* Can also blind out the file manager from seeing certain files in the file system.
* Necessary to prevent javac from seeing some sources where the source path points.
*
* <p><b>This is NOT part of any supported API.

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2012, 2016, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -169,7 +169,7 @@ public class PortFile {
public void setValues(int port, long cookie) throws IOException {
Assert.check(lock != null);
rwfile.seek(0);
// Write the magic nr that identifes a port file.
// Write the magic nr that identifies a port file.
rwfile.writeInt(magicNr);
rwfile.writeInt(port);
rwfile.writeLong(cookie);

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1996, 2015, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1996, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -68,7 +68,7 @@ public class SerialVer {
String ret = null;
boolean classFound = false;
// If using old style of qualifyling inner classes with '$'s.
// If using old style of qualifying inner classes with '$'s.
if (classname.indexOf('$') != -1) {
ret = resolveClass(classname);
} else {