Skip to content

Commit 5b73076

Browse files
authored
Fix typos and linguistic errors in documentation (#88)
Signed-off-by: Sebastien Dionne <survivant00@gmail.com>
1 parent 85e68d4 commit 5b73076

File tree

5 files changed

+7
-7
lines changed

5 files changed

+7
-7
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@
66

77
This module provides a `JsonNullable` wrapper class and a Jackson module to serialize/deserialize it.
88
The `JsonNullable` wrapper shall be used to wrap Java bean fields for which it is important to distinguish between an explicit `"null"` and the field not being present.
9-
A typical usage is when implementing [Json Merge Patch](https://tools.ietf.org/html/rfc7386) where an explicit `"null"`has the meaning "set this field to null / remove this field" whereas a non-present field has the meaning "don't change the value of this field".
9+
A typical usage is when implementing [Json Merge Patch](https://tools.ietf.org/html/rfc7386) where an explicit `"null"` has the meaning "set this field to null / remove this field" whereas a non-present field has the meaning "don't change the value of this field".
1010

1111
The module comes with an integrated `ValueExtractor` that automatically unwraps the contained value of the `JsonNullable` if used together with javax.validation Bean validation (JSR 380).
1212

13-
Note : a lot of people use `Optional` to bring this behavior.
13+
Note: a lot of people use `Optional` to bring this behavior.
1414
Although it kinda works, it's not a good idea because:
1515
* Beans shouldn't have `Optional` fields.
1616
`Optional` was designed to be used only as method return value.
@@ -84,7 +84,7 @@ The `ValueExtractor` is registered automatically via Java Service loader mechani
8484
Validator validator = Validation.buildDefaultValidatorFactory().getValidator();
8585
Pet myPet = new Pet().name(JsonNullable.of("My Pet's really long name"));
8686
Set<ConstraintViolation<Pet>> validationResult = validator.validate(myPet);
87-
assertTrue(1, validationResult.size());
87+
assertEquals(1, validationResult.size());
8888
```
8989

9090
## Limitations

src/main/java/org/openapitools/jackson/nullable/JsonNullable.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ public JsonNullable<T> filter( Predicate<T> predicate ) {
209209
/**
210210
* If a value is present, returns a JsonNullable describing the result of
211211
* applying the given mapping function to the value, otherwise returns an
212-
* undeined JsonNullable.
212+
* undefined JsonNullable.
213213
*
214214
* @param <U> the type of the value returned from the mapping function
215215
* @param mapper the mapping function to apply to a value, if present

src/test/java/org/openapitools/jackson/nullable/CreatorTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
import static org.junit.jupiter.api.Assertions.*;
1010

1111
// TODO: fix JsonNullable in constructor annotated by JsonCreator
12-
@Disabled("JsonNullable in a constructor is dederialized to JsonNullable[null] instead of JsonNullable.undefined")
12+
@Disabled("JsonNullable in a constructor is deserialized to JsonNullable[null] instead of JsonNullable.undefined")
1313
class CreatorTest extends ModuleTestBase
1414
{
1515
static class CreatorWithJsonNullableStrings

src/test/java/org/openapitools/jackson/nullable/JsonNullableUnwrappedTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
import static org.junit.jupiter.api.Assertions.assertEquals;
1616

17-
// TODO: Make JsonNulllable work with JsonUnwrapped
17+
// TODO: Make JsonNullable work with JsonUnwrapped
1818
@Disabled("JsonNullable currently doesnt work with JsonUnwrapped")
1919
class JsonNullableUnwrappedTest extends ModuleTestBase
2020
{

src/test/java/org/openapitools/jackson/nullable/StreamingApiTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -658,7 +658,7 @@ public void equivalentCall(String name, Callable<Optional<Optional<String>>> cal
658658
}
659659

660660
//
661-
// These static methods form a two-way coorespondance between JsonNullable<String> and
661+
// These static methods form a two-way correspondence between JsonNullable<String> and
662662
// Optional<Optional<String>>
663663
//
664664
static Optional<Optional<String>> nullableToOptional(JsonNullable<String> value) {

0 commit comments

Comments
 (0)