}
if (namedLayerInfo == null) {
throw new LayerException(ExceptionCode.INVALID_SLD, styledLayerDescriptorInfo.getName(), layerName);
}
UserStyleInfo userStyleInfo = null;
for (NamedLayerInfo.ChoiceInfo choice : namedLayerInfo.getChoiceList()) {
// we only support user styles, pick the right name or the first
if (choice.ifUserStyle()) {
if (styleName != null) {
if (styleName.equals(choice.getUserStyle().getName())) {