Skip to content

Commit

Permalink
Default encoding should be prechecked
Browse files Browse the repository at this point in the history
  • Loading branch information
BalusC authored and TomasHofman committed Mar 26, 2024
1 parent cb971c3 commit cea3398
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion impl/src/main/java/com/sun/faces/util/Util.java
Original file line number Diff line number Diff line change
Expand Up @@ -1677,7 +1677,9 @@ public static String getResponseEncoding(FacesContext context, Optional<String>

if (encoding == null) {
// 5. If still none found then fall back to specified default.
encoding = defaultEncoding.get();
if (defaultEncoding.isPresent()) {
encoding = defaultEncoding.get();
}

if (encoding != null && !encoding.isBlank()) {
if (LOGGER.isLoggable(FINEST)) {
Expand Down

0 comments on commit cea3398

Please sign in to comment.