SonarCloud - ParameterReassignedToCheck NoSuchElementException

This is the class causing the error:

package ****.jaxws.generic;

import java.time.Instant;
import java.time.LocalDateTime;
import java.time.ZoneId;
import java.time.ZonedDateTime;
import java.time.format.DateTimeFormatter;
import java.time.format.DateTimeFormatterBuilder;
import java.time.format.DateTimeParseException;
import java.time.temporal.ChronoField;
import java.util.Date;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

import org.apache.commons.lang3.StringUtils;

import ****.AttributeShow;

import lombok.extern.slf4j.Slf4j;

@Slf4j
public class ParseUtil {

  private static final String DATE_FORMAT_WARN_MESSAGE = "The provided date value of {} could not be parsed. Please provide a valid date format (e.g. dd.MM.yyyy).";

  private ParseUtil() {
  }

  private static final Map<String, DateTimeFormatter> DATE_FORMATS = new ConcurrentHashMap<>();

  public static Object parseForAttributeShow(String value, AttributeShow attributeShow) {
    if (value == null) {
      return null;
    }
    return switch (attributeShow.getDatatype()) {
      case NUMBER -> {
        double aDouble = Double.parseDouble(value);
        yield Double.isNaN(aDouble) ? null : aDouble;
      }
      case DATE -> {
        if (StringUtils.isBlank(value)) {
          yield null;
        }
        String format = attributeShow.getFormatString();
        DateTimeFormatter formatter = DATE_FORMATS.computeIfAbsent(format,
            f -> new DateTimeFormatterBuilder().appendPattern(f)
                .parseDefaulting(ChronoField.HOUR_OF_DAY, 0)
                .parseDefaulting(ChronoField.MINUTE_OF_HOUR, 0)
                .parseDefaulting(ChronoField.SECOND_OF_MINUTE, 0)
                .parseDefaulting(ChronoField.MILLI_OF_SECOND, 0)
                .toFormatter());
        try {
          LocalDateTime parse = LocalDateTime.parse(value, formatter);
          ZonedDateTime zonedDateTime = parse.atZone(ZoneId.systemDefault());
          Instant instant = zonedDateTime.toInstant();
          yield Date.from(instant);
        } catch (DateTimeParseException e) {
          LOGGER.warn(DATE_FORMAT_WARN_MESSAGE, value);
          yield null;
        }
      }
      default -> value;

    };
  }
}

I suspect its related to yield null, as identified in ECJ - Unable to parse file