8284893: Fix typos in java.base

Reviewed-by: iris, wetmore, lancea, mullan, naoto
This commit is contained in:
Magnus Ihse Bursie 2022-04-19 20:07:57 +00:00
parent 4594696f54
commit fb469fb894
162 changed files with 369 additions and 369 deletions

View file

@ -1040,7 +1040,7 @@ public class ArrayDeque<E> extends AbstractCollection<E>
}
/**
* Nulls out slots starting at array index i, upto index end.
* Nulls out slots starting at array index i, up to index end.
* Condition i == end means "empty" - nothing to do.
*/
private static void circularClear(Object[] es, int i, int end) {

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2005, 2021, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2005, 2022, 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
@ -1219,7 +1219,7 @@ class JapaneseImperialCalendar extends Calendar {
} else {
value = getMinimum(field);
CalendarDate d = jcal.getCalendarDate(Long.MIN_VALUE, getZone());
// Use an equvalent year of d.getYear() if
// Use an equivalent year of d.getYear() if
// possible. Otherwise, ignore the leap year and
// common year difference.
int y = d.getYear();

View file

@ -2969,7 +2969,7 @@ public abstract class ResourceBundle {
if (language.equals("zh")) {
if (region.isEmpty()) {
// Supply region(country) for users who still package Chinese
// bundles using old convension.
// bundles using old convention.
switch (script) {
case "Hans" -> region = "CN";
case "Hant" -> region = "TW";

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2021, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2022, 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
@ -2983,7 +2983,7 @@ public class TreeMap<K,V>
* potential speed-ups of using custom Spliterators versus default
* mechanics.
*
* To boostrap initialization, external constructors use
* To bootstrap initialization, external constructors use
* negative size estimates: -1 for ascend, -2 for descend.
*/
static class TreeMapSpliterator<K,V> {

View file

@ -676,7 +676,7 @@ public class ArrayBlockingQueue<E> extends AbstractQueue<E>
}
/**
* Nulls out slots starting at array index i, upto index end.
* Nulls out slots starting at array index i, up to index end.
* Condition i == end means "full" - the entire array is cleared.
*/
private static void circularClear(Object[] items, int i, int end) {

View file

@ -4908,7 +4908,7 @@ loop: for(int x=0, offset=0; x<nCodePoints; x++, offset+=len) {
if (count < cmax) {
// Let's check if we have already tried and failed
// at this starting position "i" in the past.
// If yes, then just return false wihtout trying
// If yes, then just return false without trying
// again, to stop the exponential backtracking.
if (posIndex != -1 &&
matcher.localsPos[posIndex].contains(i)) {

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2014, 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2014, 2022, 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
@ -214,7 +214,7 @@ public final class CRC32C implements Checksum {
private static int updateBytes(int crc, byte[] b, int off, int end) {
// Do only byte reads for arrays so short they can't be aligned
// or if bytes are stored with a larger witdh than one byte.,%
// or if bytes are stored with a larger width than one byte.,%
if (end - off >= 8 && Unsafe.ARRAY_BYTE_INDEX_SCALE == 1) {
// align on 8 bytes

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 1995, 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1995, 2022, 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 class ZipEntry implements ZipConstants, Cloneable {
long crc = -1; // crc-32 of entry data
long size = -1; // uncompressed size of entry data
long csize = -1; // compressed size of entry data
boolean csizeSet = false; // Only true if csize was explicitely set by
boolean csizeSet = false; // Only true if csize was explicitly set by
// a call to setCompressedSize()
int method = -1; // compression method
int flag = 0; // general purpose flag
@ -562,7 +562,7 @@ public class ZipEntry implements ZipConstants, Cloneable {
// and compressed file size fields.
// If invalid zip64 extra fields, simply skip. Even
// it's rare, it's possible the entry size happens to
// be the magic value and it "accidently" has some
// be the magic value and it "accidentally" has some
// bytes in extra match the id.
if (sz >= 16) {
size = get64(extra, off);

View file

@ -1632,7 +1632,7 @@ public class ZipFile implements ZipConstants, Closeable {
// 32 bit hash matches the hashed name.
while (idx != ZIP_ENDCHAIN) {
if (getEntryHash(idx) == hsh) {
// The CEN name must match the specfied one
// The CEN name must match the specified one
int pos = getEntryPos(idx);
try {

View file

@ -700,8 +700,8 @@ public class ZipOutputStream extends DeflaterOutputStream implements ZipConstant
writeShort(45); // version needed to extract
writeInt(0); // number of this disk
writeInt(0); // central directory start disk
writeLong(xentries.size()); // number of directory entires on disk
writeLong(xentries.size()); // number of directory entires
writeLong(xentries.size()); // number of directory entries on disk
writeLong(xentries.size()); // number of directory entries
writeLong(len); // length of central directory
writeLong(off); // offset of central directory

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2013, 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2013, 2022, 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
@ -283,7 +283,7 @@ class ZipUtils {
static final int READBLOCKSZ = 128;
/**
* Loads zip native library, if not already laoded
* Loads zip native library, if not already loaded
*/
static void loadLibrary() {
jdk.internal.loader.BootLoader.loadLibrary("zip");