Skip to content

Commit

Permalink
Merge pull request #874 from pizzi80/4.x_json
Browse files Browse the repository at this point in the history
JSON: typo + removed unnecessary .toString() call
  • Loading branch information
BalusC authored Nov 2, 2024
2 parents a9ad312 + 4ad75b9 commit 1653823
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/java/org/omnifaces/util/Json.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
*
* <h2>This class is not listed in showcase! Should I use it?</h2>
* <p>
* This class is indeed intented for internal usage only. We won't add methods here on user request. We only add methods
* This class is indeed intended for internal usage only. We won't add methods here on user request. We only add methods
* here once we encounter non-DRY code in OmniFaces codebase. The methods may be renamed/changed without notice.
* <p>
* We don't stop you from using it if you found it in the Javadoc and you think you find it useful, but you have to
Expand Down Expand Up @@ -96,7 +96,7 @@ private static void encode(Object object, StringBuilder builder, UnaryOperator<S
builder.append("null");
}
else if (object instanceof Boolean || object instanceof Number) {
builder.append(object.toString());
builder.append(object);
}
else if (object instanceof CharSequence || object instanceof Enum<?>) {
encodeString(object.toString(), builder);
Expand Down

0 comments on commit 1653823

Please sign in to comment.