Skip to content

Commit

Permalink
Use preferred spelling for "cannot"
Browse files Browse the repository at this point in the history
  • Loading branch information
garydgregory committed Nov 5, 2024
1 parent 2238b12 commit 06bca8e
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public class ConstructorUtils {
* @param <T> the type of the constructor
* @param klass the class to be constructed
* @param parameterType The constructor parameter type
* @return null if matching accessible constructor can not be found.
* @return null if matching accessible constructor cannot be found.
* @see Class#getConstructor
* @see #getAccessibleConstructor(java.lang.reflect.Constructor)
*/
Expand All @@ -64,7 +64,7 @@ public static <T> Constructor<T> getAccessibleConstructor(final Class<T> klass,
* @param <T> the type to be constructed
* @param klass the class to be constructed
* @param parameterTypes the parameter array
* @return null if matching accessible constructor can not be found
* @return null if matching accessible constructor cannot be found
* @see Class#getConstructor
* @see #getAccessibleConstructor(java.lang.reflect.Constructor)
*/
Expand All @@ -82,7 +82,7 @@ public static <T> Constructor<T> getAccessibleConstructor(final Class<T> klass,
*
* @param <T> the type of the constructor
* @param ctor prototype constructor object.
* @return {@code null} if accessible constructor can not be found.
* @return {@code null} if accessible constructor cannot be found.
* @see SecurityManager
*/
public static <T> Constructor<T> getAccessibleConstructor(final Constructor<T> ctor) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ protected <T> T convertToType(final Class<T> type, final Object value) throws Th
final String stringValue = toString(value);

if (stringValue.isEmpty()) {
throw new IllegalArgumentException("Dimensions can not be empty.");
throw new IllegalArgumentException("Dimensions cannot be empty.");
}

final Matcher matcher = DIMENSION_PATTERN.matcher(stringValue);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,15 @@ public PointConverter(final Point defaultValue) {
* @return A {@link Point} represented by the x and y coordinate of the input.
* @throws NullPointerException If the value is null.
* @throws IllegalArgumentException If the configuration value is an invalid representation of a {@link Point}.
* @throws NumberFormatException If a one of coordinates can not be parsed to an {@link Integer}.
* @throws NumberFormatException If a one of coordinates cannot be parsed to an {@link Integer}.
*/
@Override
protected <T> T convertToType(final Class<T> type, final Object value) throws Throwable {
if (Point.class.isAssignableFrom(type)) {
final String stringValue = toString(value);

if (stringValue.isEmpty()) {
throw new IllegalArgumentException("A point can not be empty.");
throw new IllegalArgumentException("A point cannot be empty.");
}

final int lastCharIndex = stringValue.length() - 1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ private FloatLocaleConverter(final Float defaultValue, final Locale locale, fina

/**
* Parses the specified locale-sensitive input object into an output object of the specified type. This method will return Float value or throw exception if
* value can not be stored in the Float.
* value cannot be stored in the Float.
*
* @param value The input object to be converted
* @param pattern The pattern is used for the conversion
Expand Down

0 comments on commit 06bca8e

Please sign in to comment.