eclipse-ee4j / mojarra

Mojarra, a Jakarta Faces implementation
Other
158 stars 107 forks source link

Util.getResponseEncoding: defaultEncoding from Optional<String> to String #5438

Open pizzi80 opened 2 months ago

pizzi80 commented 2 months ago

code simplification

BalusC commented 2 months ago

Not sure this is simplification as this duplicates RIConstants.CHAR_ENCODING and therefore decreases the control on the default outcome. Ideally the default outcome should be controlled in only one place not two.

pizzi80 commented 2 months ago

Exactly, we could simplify it further,

public static String getResponseEncoding(FacesContext context) {
    return getResponseEncoding(context, null);
}
pizzi80 commented 2 months ago

done