8284894: Fix typos in langtools

Reviewed-by: jjg
This commit is contained in:
Magnus Ihse Bursie 2022-04-14 21:41:45 +00:00
parent fbb0916090
commit 3084921d7a
10 changed files with 17 additions and 17 deletions

View File

@ -230,7 +230,7 @@ public class Annotate {
*
* @param annotations the list of JCAnnotations to attribute and enter
* @param localEnv the enclosing env
* @param s ths Symbol on which to enter the annotations
* @param s the Symbol on which to enter the annotations
* @param deferPos report errors here
*/
public void annotateLater(List<JCAnnotation> annotations, Env<AttrContext> localEnv,

View File

@ -3337,7 +3337,7 @@ public class Check {
boolean annotationApplicable(JCAnnotation a, Symbol s) {
Optional<Set<Name>> targets = getApplicableTargets(a, s);
/* the optional could be emtpy if the annotation is unknown in that case
/* the optional could be empty if the annotation is unknown in that case
* we return that it is applicable and if it is erroneous that should imply
* an error at the declaration site
*/

View File

@ -1121,7 +1121,7 @@ public class Infer {
* t = java.util.ArrayList<java.lang.String>
* s = java.util.List<T>
*
* we get this ouput (singleton list):
* we get this output (singleton list):
*
* [Pair[java.util.List<java.lang.String>,java.util.List<T>]]
*/

View File

@ -60,7 +60,7 @@ public class JavaTokenizer extends UnicodeReader {
private static final boolean scannerDebug = false;
/**
* Sentinal for non-value.
* Sentinel for non-value.
*/
private int NOT_FOUND = -1;

View File

@ -319,14 +319,14 @@ public class Tokens {
Token[] split(Tokens tokens) {
if (kind.name.length() < 2 || kind.tag != Tag.DEFAULT) {
throw new AssertionError("Cant split" + kind);
throw new AssertionError("Can't split" + kind);
}
TokenKind t1 = tokens.lookupKind(kind.name.substring(0, 1));
TokenKind t2 = tokens.lookupKind(kind.name.substring(1));
if (t1 == null || t2 == null) {
throw new AssertionError("Cant split - bad subtokens");
throw new AssertionError("Can't split - bad subtokens");
}
return new Token[] {
new Token(t1, pos, pos + t1.name.length(), comments),

View File

@ -436,7 +436,7 @@ public class UnicodeReader {
}
/**
* Skip over all occurances of character.
* Skip over all occurrences of character.
*
* @param ch character to accept.
*/

View File

@ -181,7 +181,7 @@ public abstract class Dependencies {
public abstract static class Node extends GraphUtils.AbstractNode<ClassSymbol, Node>
implements GraphUtils.DottableNode<ClassSymbol, Node> {
/**
* dependant nodes grouped by kind
* dependent nodes grouped by kind
*/
EnumMap<CompletionCause, List<Node>> depsByKind;

View File

@ -39,20 +39,20 @@ import java.util.function.Predicate;
*/
public class Iterators {
public static <I, O> Iterator<O> createCompoundIterator(Iterable<I> inputs, Function<I, Iterator<O>> convertor) {
return new CompoundIterator<>(inputs, convertor);
public static <I, O> Iterator<O> createCompoundIterator(Iterable<I> inputs, Function<I, Iterator<O>> converter) {
return new CompoundIterator<>(inputs, converter);
}
private static class CompoundIterator<I, O> implements Iterator<O> {
private final Iterator<I> inputs;
private final Function<I, Iterator<O>> convertor;
private final Function<I, Iterator<O>> converter;
@SuppressWarnings("unchecked")
private Iterator<O> currentIterator = EMPTY;
public CompoundIterator(Iterable<I> inputs, Function<I, Iterator<O>> convertor) {
public CompoundIterator(Iterable<I> inputs, Function<I, Iterator<O>> converter) {
this.inputs = inputs.iterator();
this.convertor = convertor;
this.converter = converter;
}
public boolean hasNext() {
@ -75,7 +75,7 @@ public class Iterators {
private void update() {
while (inputs.hasNext()) {
currentIterator = convertor.apply(inputs.next());
currentIterator = converter.apply(inputs.next());
if (currentIterator.hasNext()) return;
}
currentIterator = null;

View File

@ -270,8 +270,8 @@ public class JavacState {
b.append("# S L link_only_source timestamp\n");
b.append("# G C generated_source timestamp\n");
b.append("# A artifact timestamp\n");
b.append("# D S dependant -> source dependency\n");
b.append("# D C dependant -> classpath dependency\n");
b.append("# D S dependent -> source dependency\n");
b.append("# D C dependent -> classpath dependency\n");
b.append("# I pubapi\n");
b.append("R ").append(theArgs).append("\n");

View File

@ -338,7 +338,7 @@ public class TypeAnnotation {
public TargetType type = TargetType.UNKNOWN;
// For generic/array types.
// TODO: or should we use null? Noone will use this object.
// TODO: or should we use null? No one will use this object.
public List<TypePathEntry> location = new ArrayList<>(0);
// Tree position.