mojarra icon indicating copy to clipboard operation
mojarra copied to clipboard

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

Open pizzi80 opened this issue 1 year ago • 3 comments
trafficstars

code simplification

pizzi80 avatar Apr 10 '24 13:04 pizzi80

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.

BalusC avatar Apr 10 '24 14:04 BalusC

Exactly, we could simplify it further,

public static String getResponseEncoding(FacesContext context) {
    return getResponseEncoding(context, null);
}

pizzi80 avatar Apr 10 '24 14:04 pizzi80

done

pizzi80 avatar Apr 10 '24 15:04 pizzi80