< prev index next >
src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Attr.java
Print this page
@@ -1488,11 +1488,11 @@
public void visitForeachLoop(JCEnhancedForLoop tree) {
Env<AttrContext> loopEnv =
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);
Type elemtype = types.elemtype(exprType); // perhaps expr is an array?
if (elemtype == null) {
@@ -3464,11 +3464,11 @@
}
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);
}
}
if (resultInfo.checkContext.deferredAttrContext().mode == AttrMode.CHECK) {
@@ -4195,11 +4195,11 @@
case WILDCARD:
throw new AssertionError(tree);
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> {}
Symbol sym = (site.getUpperBound() != null)
? selectSym(tree, location, capture(site.getUpperBound()), env, resultInfo)
@@ -5168,11 +5168,11 @@
&& (c.flags() & (Flags.ENUM | Flags.INTERFACE)) == 0
&& !c.isAnonymous()) {
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
validateTypeAnnotations(tree, false);
}
@@ -5478,11 +5478,11 @@
/**
* Handle missing types/symbols in an AST. This routine is useful when
* 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);
}
< prev index next >