Use preferred spelling for "cannot"

This commit is contained in:
Gary Gregory 2024-11-05 05:56:02 -05:00
parent f878fba9cf
commit fa668ef0d9
5 changed files with 9 additions and 9 deletions

View File

@ -303,7 +303,7 @@ public enum JavaVersion {
* Parses a float value from a String. * Parses a float value from a String.
* *
* @param value the String to parse. * @param value the String to parse.
* @return the float value represented by the string or -1 if the given String can not be parsed. * @return the float value represented by the string or -1 if the given String cannot be parsed.
*/ */
private static float toFloatVersion(final String value) { private static float toFloatVersion(final String value) {
final int defaultReturnValue = -1; final int defaultReturnValue = -1;

View File

@ -256,7 +256,7 @@ public class LocaleUtils {
* *
* @param str the String to parse as a Locale. * @param str the String to parse as a Locale.
* @return a Locale parsed from the given String. * @return a Locale parsed from the given String.
* @throws IllegalArgumentException if the given String can not be parsed. * @throws IllegalArgumentException if the given String cannot be parsed.
* @see Locale * @see Locale
*/ */
private static Locale parseLocale(final String str) { private static Locale parseLocale(final String str) {

View File

@ -413,14 +413,14 @@ public class Validate {
* *
* <pre>Validate.isAssignableFrom(SuperClass.class, object.getClass());</pre> * <pre>Validate.isAssignableFrom(SuperClass.class, object.getClass());</pre>
* *
* <p>The message of the exception is &quot;The validated object can not be converted to the&quot; * <p>The message of the exception is &quot;The validated object cannot be converted to the&quot;
* followed by the name of the class and &quot;class&quot;</p> * followed by the name of the class and &quot;class&quot;</p>
* *
* @param superType the class must be validated against, not null * @param superType the class must be validated against, not null
* @param type the class to check, not null * @param type the class to check, not null
* @param message the {@link String#format(String, Object...)} exception message if invalid, not null * @param message the {@link String#format(String, Object...)} exception message if invalid, not null
* @param values the optional values for the formatted exception message, null array not recommended * @param values the optional values for the formatted exception message, null array not recommended
* @throws IllegalArgumentException if argument can not be converted to the specified class * @throws IllegalArgumentException if argument cannot be converted to the specified class
* @see #isAssignableFrom(Class, Class) * @see #isAssignableFrom(Class, Class)
*/ */
public static void isAssignableFrom(final Class<?> superType, final Class<?> type, final String message, final Object... values) { public static void isAssignableFrom(final Class<?> superType, final Class<?> type, final String message, final Object... values) {

View File

@ -96,7 +96,7 @@ public final class Fraction extends Number implements Comparable<Fraction> {
* @param x an addend * @param x an addend
* @param y an addend * @param y an addend
* @return the sum {@code x+y} * @return the sum {@code x+y}
* @throws ArithmeticException if the result can not be represented as * @throws ArithmeticException if the result cannot be represented as
* an int * an int
*/ */
private static int addAndCheck(final int x, final int y) { private static int addAndCheck(final int x, final int y) {
@ -394,7 +394,7 @@ public final class Fraction extends Number implements Comparable<Fraction> {
* @param x a factor * @param x a factor
* @param y a factor * @param y a factor
* @return the product {@code x*y} * @return the product {@code x*y}
* @throws ArithmeticException if the result can not be represented as * @throws ArithmeticException if the result cannot be represented as
* an int * an int
*/ */
private static int mulAndCheck(final int x, final int y) { private static int mulAndCheck(final int x, final int y) {
@ -411,7 +411,7 @@ public final class Fraction extends Number implements Comparable<Fraction> {
* @param x a non-negative factor * @param x a non-negative factor
* @param y a non-negative factor * @param y a non-negative factor
* @return the product {@code x*y} * @return the product {@code x*y}
* @throws ArithmeticException if the result can not be represented as * @throws ArithmeticException if the result cannot be represented as
* an int * an int
*/ */
private static int mulPosAndCheck(final int x, final int y) { private static int mulPosAndCheck(final int x, final int y) {
@ -429,7 +429,7 @@ public final class Fraction extends Number implements Comparable<Fraction> {
* @param x the minuend * @param x the minuend
* @param y the subtrahend * @param y the subtrahend
* @return the difference {@code x-y} * @return the difference {@code x-y}
* @throws ArithmeticException if the result can not be represented as * @throws ArithmeticException if the result cannot be represented as
* an int * an int
*/ */
private static int subAndCheck(final int x, final int y) { private static int subAndCheck(final int x, final int y) {

View File

@ -41,7 +41,7 @@ public class TimedSemaphoreTest extends AbstractLangTest {
/** /**
* A test thread class that will be used by tests for triggering the * A test thread class that will be used by tests for triggering the
* semaphore. The thread calls the semaphore a configurable number of times. * semaphore. The thread calls the semaphore a configurable number of times.
* When this is done, it can notify the main thread. * When this is done, it cannotify the main thread.
*/ */
private static final class SemaphoreThread extends Thread { private static final class SemaphoreThread extends Thread {
/** The semaphore. */ /** The semaphore. */