Skip to content

Commit fa668ef

Browse files
committed
Use preferred spelling for "cannot"
1 parent f878fba commit fa668ef

File tree

5 files changed

+9
-9
lines changed

5 files changed

+9
-9
lines changed

src/main/java/org/apache/commons/lang3/JavaVersion.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@ static String[] split(final String value) {
303303
* Parses a float value from a String.
304304
*
305305
* @param value the String to parse.
306-
* @return the float value represented by the string or -1 if the given String can not be parsed.
306+
* @return the float value represented by the string or -1 if the given String cannot be parsed.
307307
*/
308308
private static float toFloatVersion(final String value) {
309309
final int defaultReturnValue = -1;

src/main/java/org/apache/commons/lang3/LocaleUtils.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ public static List<Locale> localeLookupList(final Locale locale, final Locale de
256256
*
257257
* @param str the String to parse as a Locale.
258258
* @return a Locale parsed from the given String.
259-
* @throws IllegalArgumentException if the given String can not be parsed.
259+
* @throws IllegalArgumentException if the given String cannot be parsed.
260260
* @see Locale
261261
*/
262262
private static Locale parseLocale(final String str) {

src/main/java/org/apache/commons/lang3/Validate.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -413,14 +413,14 @@ public static void isAssignableFrom(final Class<?> superType, final Class<?> typ
413413
*
414414
* <pre>Validate.isAssignableFrom(SuperClass.class, object.getClass());</pre>
415415
*
416-
* <p>The message of the exception is &quot;The validated object can not be converted to the&quot;
416+
* <p>The message of the exception is &quot;The validated object cannot be converted to the&quot;
417417
* followed by the name of the class and &quot;class&quot;</p>
418418
*
419419
* @param superType the class must be validated against, not null
420420
* @param type the class to check, not null
421421
* @param message the {@link String#format(String, Object...)} exception message if invalid, not null
422422
* @param values the optional values for the formatted exception message, null array not recommended
423-
* @throws IllegalArgumentException if argument can not be converted to the specified class
423+
* @throws IllegalArgumentException if argument cannot be converted to the specified class
424424
* @see #isAssignableFrom(Class, Class)
425425
*/
426426
public static void isAssignableFrom(final Class<?> superType, final Class<?> type, final String message, final Object... values) {

src/main/java/org/apache/commons/lang3/math/Fraction.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ public final class Fraction extends Number implements Comparable<Fraction> {
9696
* @param x an addend
9797
* @param y an addend
9898
* @return the sum {@code x+y}
99-
* @throws ArithmeticException if the result can not be represented as
99+
* @throws ArithmeticException if the result cannot be represented as
100100
* an int
101101
*/
102102
private static int addAndCheck(final int x, final int y) {
@@ -394,7 +394,7 @@ private static int greatestCommonDivisor(int u, int v) {
394394
* @param x a factor
395395
* @param y a factor
396396
* @return the product {@code x*y}
397-
* @throws ArithmeticException if the result can not be represented as
397+
* @throws ArithmeticException if the result cannot be represented as
398398
* an int
399399
*/
400400
private static int mulAndCheck(final int x, final int y) {
@@ -411,7 +411,7 @@ private static int mulAndCheck(final int x, final int y) {
411411
* @param x a non-negative factor
412412
* @param y a non-negative factor
413413
* @return the product {@code x*y}
414-
* @throws ArithmeticException if the result can not be represented as
414+
* @throws ArithmeticException if the result cannot be represented as
415415
* an int
416416
*/
417417
private static int mulPosAndCheck(final int x, final int y) {
@@ -429,7 +429,7 @@ private static int mulPosAndCheck(final int x, final int y) {
429429
* @param x the minuend
430430
* @param y the subtrahend
431431
* @return the difference {@code x-y}
432-
* @throws ArithmeticException if the result can not be represented as
432+
* @throws ArithmeticException if the result cannot be represented as
433433
* an int
434434
*/
435435
private static int subAndCheck(final int x, final int y) {

src/test/java/org/apache/commons/lang3/concurrent/TimedSemaphoreTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public class TimedSemaphoreTest extends AbstractLangTest {
4141
/**
4242
* A test thread class that will be used by tests for triggering the
4343
* semaphore. The thread calls the semaphore a configurable number of times.
44-
* When this is done, it can notify the main thread.
44+
* When this is done, it cannotify the main thread.
4545
*/
4646
private static final class SemaphoreThread extends Thread {
4747
/** The semaphore. */

0 commit comments

Comments
 (0)