From 26c1b30e91fc87747de7d373e0e7989a9369279b Mon Sep 17 00:00:00 2001 From: bpb Date: Mon, 15 Jul 2013 14:37:01 -0700 Subject: [PATCH] 8020409: Clean up doclint problems in java.util package, part 1 Summary: Clean up doclint problems in java.util package, part 1 Reviewed-by: darcy Contributed-by: Brian Burkhalter --- src/share/classes/java/util/ArrayList.java | 4 +- src/share/classes/java/util/Arrays.java | 17 ++ src/share/classes/java/util/Base64.java | 9 +- src/share/classes/java/util/BitSet.java | 6 + src/share/classes/java/util/Calendar.java | 5 +- src/share/classes/java/util/Collection.java | 6 +- src/share/classes/java/util/Collections.java | 108 +++++++++---- src/share/classes/java/util/EnumSet.java | 17 ++ .../classes/java/util/GregorianCalendar.java | 2 +- src/share/classes/java/util/Locale.java | 89 +++++++---- .../classes/java/util/ResourceBundle.java | 150 +++++++++--------- 11 files changed, 261 insertions(+), 152 deletions(-) diff --git a/src/share/classes/java/util/ArrayList.java b/src/share/classes/java/util/ArrayList.java index 2211cc8f1..b7d5349cc 100644 --- a/src/share/classes/java/util/ArrayList.java +++ b/src/share/classes/java/util/ArrayList.java @@ -70,9 +70,9 @@ import java.util.function.UnaryOperator; * unsynchronized access to the list:
  *   List list = Collections.synchronizedList(new ArrayList(...));
* - *

+ *

* The iterators returned by this class's {@link #iterator() iterator} and - * {@link #listIterator(int) listIterator} methods are fail-fast: + * {@link #listIterator(int) listIterator} methods are fail-fast: * if the list is structurally modified at any time after the iterator is * created, in any way except through the iterator's own * {@link ListIterator#remove() remove} or diff --git a/src/share/classes/java/util/Arrays.java b/src/share/classes/java/util/Arrays.java index 3e81c11b8..47c99ef7f 100644 --- a/src/share/classes/java/util/Arrays.java +++ b/src/share/classes/java/util/Arrays.java @@ -984,6 +984,7 @@ public class Arrays { * {@link ForkJoinPool#commonPool() ForkJoin common pool} is used to * execute any parallel tasks. * + * @param the class of the objects to be sorted * @param a the array to be sorted * * @throws ClassCastException if the array contains elements that are not @@ -1035,6 +1036,7 @@ public class Arrays { * array. The {@link ForkJoinPool#commonPool() ForkJoin common pool} is * used to execute any parallel tasks. * + * @param the class of the objects to be sorted * @param a the array to be sorted * @param fromIndex the index of the first element (inclusive) to be * sorted @@ -1087,6 +1089,7 @@ public class Arrays { * {@link ForkJoinPool#commonPool() ForkJoin common pool} is used to * execute any parallel tasks. * + * @param the class of the objects to be sorted * @param a the array to be sorted * @param cmp the comparator to determine the order of the array. A * {@code null} value indicates that the elements' @@ -1138,6 +1141,7 @@ public class Arrays { * array. The {@link ForkJoinPool#commonPool() ForkJoin common pool} is * used to execute any parallel tasks. * + * @param the class of the objects to be sorted * @param a the array to be sorted * @param fromIndex the index of the first element (inclusive) to be * sorted @@ -1412,6 +1416,7 @@ public class Arrays { * Fourth Annual ACM-SIAM Symposium on Discrete Algorithms, pp 467-474, * January 1993. * + * @param the class of the objects to be sorted * @param a the array to be sorted * @param c the comparator to determine the order of the array. A * {@code null} value indicates that the elements' @@ -1475,6 +1480,7 @@ public class Arrays { * Fourth Annual ACM-SIAM Symposium on Discrete Algorithms, pp 467-474, * January 1993. * + * @param the class of the objects to be sorted * @param a the array to be sorted * @param fromIndex the index of the first element (inclusive) to be * sorted @@ -1569,6 +1575,7 @@ public class Arrays { * Parallel prefix computation is usually more efficient than * sequential loops for large arrays. * + * @param the class of the objects in the array * @param array the array, which is modified in-place by this method * @param op a side-effect-free, associative function to perform the * cumulation @@ -1585,6 +1592,7 @@ public class Arrays { * Performs {@link #parallelPrefix(Object[], BinaryOperator)} * for the given subrange of the array. * + * @param the class of the objects in the array * @param array the array * @param fromIndex the index of the first element, inclusive * @param toIndex the index of the last element, exclusive @@ -2437,6 +2445,7 @@ public class Arrays { * elements equal to the specified object, there is no guarantee which one * will be found. * + * @param the class of the objects in the array * @param a the array to be searched * @param key the value to be searched for * @param c the comparator by which the array is ordered. A @@ -2472,6 +2481,7 @@ public class Arrays { * If the range contains multiple elements equal to the specified object, * there is no guarantee which one will be found. * + * @param the class of the objects in the array * @param a the array to be searched * @param fromIndex the index of the first element (inclusive) to be * searched @@ -3143,6 +3153,7 @@ public class Arrays { * is greater than that of the original array. * The resulting array is of exactly the same class as the original array. * + * @param the class of the objects in the array * @param original the array to be copied * @param newLength the length of the copy to be returned * @return a copy of the original array, truncated or padded with nulls @@ -3166,6 +3177,8 @@ public class Arrays { * is greater than that of the original array. * The resulting array is of the class newType. * + * @param the class of the objects in the original array + * @param the class of the objects in the returned array * @param original the array to be copied * @param newLength the length of the copy to be returned * @param newType the class of the copy to be returned @@ -3396,6 +3409,7 @@ public class Arrays { *

* The resulting array is of exactly the same class as the original array. * + * @param the class of the objects in the array * @param original the array from which a range is to be copied * @param from the initial index of the range to be copied, inclusive * @param to the final index of the range to be copied, exclusive. @@ -3428,6 +3442,8 @@ public class Arrays { * of the returned array will be to - from. * The resulting array is of the class newType. * + * @param the class of the objects in the original array + * @param the class of the objects in the returned array * @param original the array from which a range is to be copied * @param from the initial index of the range to be copied, inclusive * @param to the final index of the range to be copied, exclusive. @@ -3760,6 +3776,7 @@ public class Arrays { * List<String> stooges = Arrays.asList("Larry", "Moe", "Curly"); * * + * @param the class of the objects in the array * @param a the array by which the list will be backed * @return a list view of the specified array */ diff --git a/src/share/classes/java/util/Base64.java b/src/share/classes/java/util/Base64.java index 2dbaf921a..39da03b7e 100644 --- a/src/share/classes/java/util/Base64.java +++ b/src/share/classes/java/util/Base64.java @@ -42,24 +42,21 @@ import java.nio.charset.StandardCharsets; * *

*

* *
  • Special cases for Chinese. When an input Locale has the * language "zh" (Chinese) and an empty script value, either "Hans" (Simplified) or @@ -2248,21 +2248,21 @@ public abstract class ResourceBundle { * is empty, no script is supplied. For example, for Locale("zh", "CN") * , the candidate list will be: *
      - *
    • [L("zh"), S("Hans"), C("CN")] - *
    • [L("zh"), S("Hans")] - *
    • [L("zh"), C("CN")] - *
    • [L("zh")] - *
    • Locale.ROOT + *
    • [L("zh"), S("Hans"), C("CN")]
    • + *
    • [L("zh"), S("Hans")]
    • + *
    • [L("zh"), C("CN")]
    • + *
    • [L("zh")]
    • + *
    • Locale.ROOT
    • *
    * * For Locale("zh", "TW"), the candidate list will be: *
      - *
    • [L("zh"), S("Hant"), C("TW")] - *
    • [L("zh"), S("Hant")] - *
    • [L("zh"), C("TW")] - *
    • [L("zh")] - *
    • Locale.ROOT - *
    + *
  • [L("zh"), S("Hant"), C("TW")]
  • + *
  • [L("zh"), S("Hant")]
  • + *
  • [L("zh"), C("TW")]
  • + *
  • [L("zh")]
  • + *
  • Locale.ROOT
  • + * * *
  • Special cases for Norwegian. Both Locale("no", "NO", * "NY") and Locale("nn", "NO") represent Norwegian @@ -2270,10 +2270,10 @@ public abstract class ResourceBundle { * list is generated up to [L("nn")], and then the following * candidates are added: * - *
    • [L("no"), C("NO"), V("NY")] - *
    • [L("no"), C("NO")] - *
    • [L("no")] - *
    • Locale.ROOT + *
      • [L("no"), C("NO"), V("NY")]
      • + *
      • [L("no"), C("NO")]
      • + *
      • [L("no")]
      • + *
      • Locale.ROOT
      • *
      * * If the locale is exactly Locale("no", "NO", "NY"), it is first @@ -2290,20 +2290,18 @@ public abstract class ResourceBundle { * candidate list: * *
        - *
      • [L("nb"), C("NO"), V("POSIX")] - *
      • [L("no"), C("NO"), V("POSIX")] - *
      • [L("nb"), C("NO")] - *
      • [L("no"), C("NO")] - *
      • [L("nb")] - *
      • [L("no")] - *
      • Locale.ROOT + *
      • [L("nb"), C("NO"), V("POSIX")]
      • + *
      • [L("no"), C("NO"), V("POSIX")]
      • + *
      • [L("nb"), C("NO")]
      • + *
      • [L("no"), C("NO")]
      • + *
      • [L("nb")]
      • + *
      • [L("no")]
      • + *
      • Locale.ROOT
      • *
      * * Locale("no", "NO", "POSIX") would generate the same list * except that locales with "no" would appear before the corresponding * locales with "nb".
    • - * - * * * *

      The default implementation uses an {@link ArrayList} that -- GitLab