diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Preview.java b/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Preview.java index a105de9faaf..fc023219b33 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Preview.java +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Preview.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018, 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2018, 2023, 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 @@ -124,7 +124,7 @@ public class Preview { * Returns true if {@code s} is deemed to participate in the preview of {@code previewSymbol}, and * therefore no warnings or errors will be produced. * - * @parem syms the symbol table + * @param syms the symbol table * @param s the symbol depending on the preview symbol * @param previewSymbol the preview symbol marked with @Preview * @return true if {@code s} is participating in the preview of {@code previewSymbol} diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Scope.java b/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Scope.java index 907171a701c..18a8acf2ebb 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Scope.java +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Scope.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2021, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 2023, 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 @@ -113,14 +113,14 @@ public abstract class Scope { public abstract Iterable getSymbolsByName(final Name name, final Predicate sf, final LookupKind lookupKind); - /** Return the first Symbol from this or outward scopes with the given name. + /** Returns the first Symbol from this or outward scopes with the given name. * Returns null if none. */ public final Symbol findFirst(Name name) { return findFirst(name, noFilter); } - /** Return the first Symbol from this or outward scopes with the given name that matches the + /** Returns the first Symbol from this or outward scopes with the given name that matches the * given filter. Returns null if none. */ public Symbol findFirst(Name name, Predicate sf) { @@ -128,7 +128,7 @@ public abstract class Scope { return it.hasNext() ? it.next() : null; } - /** Returns true iff there are is at least one Symbol in this scope matching the given filter. + /** Returns true iff there is at least one Symbol in this scope matching the given filter. * Does not inspect outward scopes. */ public boolean anyMatch(Predicate filter) { @@ -153,7 +153,7 @@ public abstract class Scope { return !getSymbols(NON_RECURSIVE).iterator().hasNext(); } - /** Returns the Scope from which the givins Symbol originates in this scope. + /** Returns the Scope from which the given Symbol originates in this scope. */ public abstract Scope getOrigin(Symbol byName); @@ -232,7 +232,7 @@ public abstract class Scope { public abstract void remove(Symbol c); /** Construct a fresh scope within this scope, with same owner. The new scope may - * shares internal structures with the this scope. Used in connection with + * share internal structures with this scope. Used in connection with * method leave if scope access is stack-like in order to avoid allocation * of fresh tables. */ @@ -241,7 +241,7 @@ public abstract class Scope { } /** Construct a fresh scope within this scope, with new owner. The new scope may - * shares internal structures with the this scope. Used in connection with + * share internal structures with this scope. Used in connection with * method leave if scope access is stack-like in order to avoid allocation * of fresh tables. */ @@ -276,7 +276,7 @@ public abstract class Scope { */ private boolean shared; - /** Next enclosing scope (with whom this scope may share a hashtable) + /** Next enclosing scope (with whom this scope may share a hash table) */ public ScopeImpl next; diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Symbol.java b/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Symbol.java index 3ead7b1d1db..f3d3ca80c0e 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Symbol.java +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Symbol.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 2023, 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 @@ -839,8 +839,8 @@ public abstract class Symbol extends AnnoConstruct implements PoolConstant, Elem if (type.hasTag(CLASS)) { return types.rank(that.type) < types.rank(this.type) || - types.rank(that.type) == types.rank(this.type) && - that.getQualifiedName().compareTo(this.getQualifiedName()) < 0; + (types.rank(that.type) == types.rank(this.type) && + that.getQualifiedName().compareTo(this.getQualifiedName()) < 0); } else if (type.hasTag(TYPEVAR)) { return types.isSubtype(this.type, that.type); } diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Types.java b/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Types.java index 36589d20872..db7ddacf793 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Types.java +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Types.java @@ -2863,7 +2863,7 @@ public class Types { /** * Merge multiple abstract methods. The preferred method is a method that is a subsignature * of all the other signatures and whose return type is more specific {@link MostSpecificReturnCheck}. - * The resulting preferred method has a thrown clause that is the intersection of the merged + * The resulting preferred method has a throws clause that is the intersection of the merged * methods' clauses. */ public Optional mergeAbstracts(List ambiguousInOrder, Type site, boolean sigCheck) { @@ -3692,7 +3692,7 @@ public class Types { * *

A closure is a list of all the supertypes and interfaces of * a class or interface type, ordered by ClassSymbol.precedes - * (that is, subclasses come first, arbitrary but fixed + * (that is, subclasses come first, arbitrarily but fixed * otherwise). */ private Map> closureCache = new HashMap<>(); diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Flow.java b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Flow.java index 0c151058b18..2a12961490d 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Flow.java +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Flow.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 2023, 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 @@ -1216,7 +1216,7 @@ public class Flow { } } - // add intersection of all thrown clauses of initial constructors + // add intersection of all throws clauses of initial constructors // to set of caught exceptions, unless class is anonymous. if (!anonymousClass) { boolean firstConstructor = true; diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Resolve.java b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Resolve.java index 35e64502d10..c79903b7e1a 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Resolve.java +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Resolve.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 2023, 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 @@ -476,7 +476,7 @@ public class Resolve { * and the selection takes place in given class? * @param sym The symbol with protected access * @param c The class where the access takes place - * @site The type of the qualifier + * @param site The type of the qualifier */ private boolean isProtectedAccessible(Symbol sym, ClassSymbol c, Type site) { diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/ClassReader.java b/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/ClassReader.java index 16ed4bea5e9..259773c64c4 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/ClassReader.java +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/ClassReader.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2022, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 2023, 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 @@ -239,13 +239,13 @@ public class ClassReader { /** * The prototype @Target Attribute.Compound if this class is an annotation annotated with - * @Target + * {@code @Target} */ CompoundAnnotationProxy target; /** * The prototype @Repeatable Attribute.Compound if this class is an annotation annotated with - * @Repeatable + * {@code @Repeatable} */ CompoundAnnotationProxy repeatable; diff --git a/src/jdk.compiler/share/classes/com/sun/tools/javac/model/JavacElements.java b/src/jdk.compiler/share/classes/com/sun/tools/javac/model/JavacElements.java index 6ffc7a342c8..0e87baa7fe9 100644 --- a/src/jdk.compiler/share/classes/com/sun/tools/javac/model/JavacElements.java +++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/model/JavacElements.java @@ -537,9 +537,6 @@ public class JavacElements implements Elements { return valmap; } - /** - * {@inheritDoc} - */ @DefinedBy(Api.LANGUAGE_MODEL) public FilteredMemberList getAllMembers(TypeElement element) { Symbol sym = cast(Symbol.class, element);