Skip to content

Commit 2063f5f

Browse files
committed
Fix typo in javadoc/comment
1 parent 87eb6fe commit 2063f5f

File tree

7 files changed

+9
-9
lines changed

7 files changed

+9
-9
lines changed

easy-random-core/src/main/java/org/jeasy/random/EasyRandom.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ <T> T doPopulateBean(final Class<T> type, final RandomizationContext context) {
152152

153153
// retrieve declared and inherited fields
154154
List<Field> fields = getDeclaredFields(result);
155-
// we can not use type here, because with classpath scanning enabled the result can be a subtype
155+
// we cannot use type here, because with classpath scanning enabled the result can be a subtype
156156
fields.addAll(getInheritedFields(result.getClass()));
157157

158158
// inner classes (and static nested classes) have a field named "this$0" that references the enclosing class.

easy-random-core/src/main/java/org/jeasy/random/FieldPopulator.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
import static org.jeasy.random.util.ReflectionUtils.*;
4040

4141
/**
42-
* Component that encapsulate the logic of generating a random value for a given field.
42+
* Component that encapsulates the logic of generating a random value for a given field.
4343
* It collaborates with a:
4444
* <ul>
4545
* <li>{@link EasyRandom} whenever the field is a user defined type.</li>
@@ -142,7 +142,7 @@ private Object generateRandomValue(final Field field, final RandomizationContext
142142
} else if (isOptionalType(fieldType)) {
143143
return optionalPopulator.getRandomOptional(field, context);
144144
} else {
145-
if (context.getParameters().isScanClasspathForConcreteTypes() && isAbstract(fieldType) && !isEnumType(fieldType) /*enums can be abstract, but can not inherit*/) {
145+
if (context.getParameters().isScanClasspathForConcreteTypes() && isAbstract(fieldType) && !isEnumType(fieldType) /*enums can be abstract, but cannot inherit*/) {
146146
List<Class<?>> parameterizedTypes = filterSameParameterizedTypes(getPublicConcreteSubTypesOf(fieldType), fieldGenericType);
147147
if (parameterizedTypes.isEmpty()) {
148148
throw new ObjectCreationException("Unable to find a matching concrete subtype of type: " + fieldType);

easy-random-core/src/main/java/org/jeasy/random/TypePredicates.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,11 +141,11 @@ public static Predicate<Class<?>> isArray() {
141141
}
142142

143143
/**
144-
* Create a predicate to check if a type is is assignable from another type.
144+
* Create a predicate to check if a type is assignable from another type.
145145
*
146146
* @param type to check
147147
*
148-
* @return a predicate to check if a type is is assignable from another type.
148+
* @return a predicate to check if a type is assignable from another type.
149149
*/
150150
public static Predicate<Class<?>> isAssignableFrom(Class<?> type) {
151151
return clazz -> clazz.isAssignableFrom(type);

easy-random-core/src/main/java/org/jeasy/random/util/ReflectionUtils.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ public static void setFieldValue(final Object object, final Field field, final O
161161
* @param object instance to get the field of
162162
* @param field field to get the value of
163163
* @return the value of the field
164-
* @throws IllegalAccessException if field can not be accessed
164+
* @throws IllegalAccessException if field cannot be accessed
165165
*/
166166
public static Object getFieldValue(final Object object, final Field field) throws IllegalAccessException {
167167
boolean access = field.isAccessible();

easy-random-core/src/test/java/org/jeasy/random/randomizers/time/TimeZoneRandomizerTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ void generatedValueShouldNotBeNull() {
4646

4747
@Test
4848
void shouldGenerateTheSameValueForTheSameSeed() {
49-
// we can not use a canned value, because the available TimeZones differ between locales/jdks
49+
// we cannot use a canned value, because the available TimeZones differ between locales/jdks
5050
TimeZone firstTimeZone = new TimeZoneRandomizer(SEED).getRandomValue();
5151
TimeZone secondTimeZone = new TimeZoneRandomizer(SEED).getRandomValue();
5252

easy-random-core/src/test/java/org/jeasy/random/randomizers/time/ZoneIdRandomizerTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ void generatedValueShouldNotBeNull() {
4646

4747
@Test
4848
void shouldGenerateTheSameValueForTheSameSeed() {
49-
// we can not use a canned value, because values returned by the randomizer differ between locales/jdks
49+
// we cannot use a canned value, because values returned by the randomizer differ between locales/jdks
5050
ZoneId firstZoneId = new ZoneIdRandomizer(SEED).getRandomValue();
5151
ZoneId secondZoneId = new ZoneIdRandomizer(SEED).getRandomValue();
5252

easy-random-core/src/test/java/org/jeasy/random/randomizers/time/ZonedDateTimeRandomizerTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ void shouldGenerateTheSameValueForTheSameSeed() {
5151
ZonedDateTimeRandomizer secondSeededZonedDateTimeRandomizer = new ZonedDateTimeRandomizer(SEED);
5252

5353
// when
54-
// we can not use a canned value, because the available TimeZones differ between locales/jdks
54+
// we cannot use a canned value, because the available TimeZones differ between locales/jdks
5555
ZonedDateTime firstZonedTimeDate = firstSeededZonedDateTimeRandomizer.getRandomValue();
5656
ZonedDateTime secondZonedTimeDate = secondSeededZonedDateTimeRandomizer.getRandomValue();
5757

0 commit comments

Comments
 (0)