Skip to content

Commit

Permalink
fix comment
Browse files Browse the repository at this point in the history
  • Loading branch information
FANNG1 committed May 16, 2024
1 parent 5a48e12 commit ce2fa86
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ private static class ObjectMapperHolder {
/**
* Retrieves a globally shared {@link ObjectMapper} instance.
*
* <p>Note: This ObjectMapper is shared across all users. If you need to modify the default
* <p>Note: This ObjectMapper is a global singe instance. If you need to modify the default
* serialization/deserialization settings, make changes within the INSTANCE builder directly.
* Avoid modifying properties of the returned {@code ObjectMapper} instance to prevent unintended
* side effects.
Expand All @@ -42,4 +42,6 @@ private static class ObjectMapperHolder {
public static ObjectMapper objectMapper() {
return ObjectMapperHolder.INSTANCE;
}

private ObjectMapperProvider() {}
}
Original file line number Diff line number Diff line change
Expand Up @@ -236,13 +236,17 @@ private static class ObjectMapperHolder {
}

/**
* Get the shared ObjectMapper instance for JSON serialization/deserialization.
* Returns a shared {@link ObjectMapper} instance for JSON serialization/deserialization test.
*
* <p>This instance should only be used for testing. For production or other environments, obtain
* an {@link ObjectMapper} from the appropriate {@code ObjectMapperProvider} on the server or
* client side.
* <p>Note: This instance is intended for testing purposes only. For production use, obtain an
* {@link ObjectMapper} from the following providers:
*
* @return the shared {@link ObjectMapper} instance for tests.
* <ul>
* <li>Client side: {@code com.datastrato.gravitino.client.ObjectMapperProvider}
* <li>Server side: {@code com.datastrato.gravitino.server.web.ObjectMapperProvider}
* </ul>
*
* @return the shared {@link ObjectMapper} instance for testing.
*/
@VisibleForTesting
public static ObjectMapper objectMapper() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ private static class ObjectMapperHolder {
/**
* Retrieves a globally shared {@link ObjectMapper} instance.
*
* <p>Note: This ObjectMapper is shared across all users. If you need to modify the default
* <p>Note: This ObjectMapper is a global single instance. If you need to modify the default
* serialization/deserialization settings, make changes within the INSTANCE builder directly.
* Avoid modifying properties of the returned {@code ObjectMapper} instance to prevent unintended
* side effects.
Expand Down

0 comments on commit ce2fa86

Please sign in to comment.