Skip to content

Commit

Permalink
Javadoc edits
Browse files Browse the repository at this point in the history
  • Loading branch information
mizosoft committed May 9, 2022
1 parent 0082fa1 commit 23d906d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ mapper, writerFactory, toMediaTypeArray(firstMediaType, otherMediaTypes))
}

/**
* Returns an {@code Decoder} that uses a default {@code ObjectMapper} for JSON and is only
* Returns a {@code Decoder} that uses a default {@code ObjectMapper} for JSON and is only
* compatible with {@code application/json}.
*
* @deprecated Use {@link #createJsonDecoder()}.
Expand All @@ -116,7 +116,7 @@ public static Decoder createDecoder() {
}

/**
* Returns an {@code Decoder} that uses the given {@code ObjectMapper} and is only compatible with
* Returns a {@code Decoder} that uses the given {@code ObjectMapper} and is only compatible with
* {@code application/json}.
*
* @deprecated Use {@link #createJsonDecoder(ObjectMapper)}.
Expand All @@ -127,15 +127,15 @@ public static Decoder createDecoder(ObjectMapper mapper) {
}

/**
* Returns an {@code Decoder} that uses a default {@code ObjectMapper} for JSON and is only
* Returns a {@code Decoder} that uses a default {@code ObjectMapper} for JSON and is only
* compatible with {@code application/json}.
*/
public static Decoder createJsonDecoder() {
return createJsonDecoder(new JsonMapper());
}

/**
* Returns an {@code Decoder} that uses the given {@code ObjectMapper} and is only compatible with
* Returns a {@code Decoder} that uses the given {@code ObjectMapper} and is only compatible with
* {@code application/json}.
*/
public static Decoder createJsonDecoder(ObjectMapper mapper) {
Expand Down Expand Up @@ -180,7 +180,6 @@ private static MediaType[] toMediaTypeArray(
private static boolean isBinaryFormat(ObjectMapper mapper) {
var factory = mapper.getFactory();
try {
// Attempt to create a generator from a Writer
factory.createGenerator(Writer.nullWriter());
} catch (UnsupportedOperationException e) {
return true;
Expand Down
12 changes: 6 additions & 6 deletions methanol-jackson/src/main/java/module-info.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,17 @@

/**
* Provides {@link com.github.mizosoft.methanol.BodyAdapter.Encoder} and {@link
* com.github.mizosoft.methanol.BodyAdapter.Decoder} implementations for JSON using the Jackson
* library. Note that, for the sake of configurability, the adapters are not service-provided by
* default. You will need to explicitly declare service-providers that delegate to the instances
* created by {@link JacksonAdapterFactory}.
* com.github.mizosoft.methanol.BodyAdapter.Decoder} implementations for the Jackson library. Note
* that, for the sake of configurability, the adapters are not service-provided by default. You will
* need to explicitly declare service-providers that delegate to the instances created by {@link
* JacksonAdapterFactory}.
*/
module methanol.adapter.jackson {
requires transitive methanol;
requires transitive com.fasterxml.jackson.databind;
requires static org.checkerframework.checker.qual;

exports com.github.mizosoft.methanol.adapter.jackson;
exports com.github.mizosoft.methanol.adapter.jackson.internal
to methanol.adapter.jackson.flux;
exports com.github.mizosoft.methanol.adapter.jackson.internal to
methanol.adapter.jackson.flux;
}

0 comments on commit 23d906d

Please sign in to comment.