ERROR: Unable to run check class - S2093 on file

Hi all! I have the issues:
ERROR: Unable to run check class - on file

ERROR: Unable to run check class - S2093 on file

INFO: SonarScanner
INFO: Java 11.0.10 AdoptOpenJDK (64-bit)
INFO: Linux 4.12.14-150.47-default amd64
INFO: Project root configuration file: /config/
INFO: Analyzing on SonarQube server 8.9.6

Could you please help me fix them?


Would you be able to share the file in question? Or a minimal set of code from the file that will reproduce the error?


Hi! Thanks

<package com.cp.udr.mbm.leader.monitor;

import com.cp.udr.mbm.MessageBusMonitor;
import com.cp.udr.monitors.leader.MonitorTask;
import java.util.List;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

 * This class builds the monitor tasks to be checked by the {@link MessageBusMonitor} object.
 * <p>The {@link PublisherConsumerMonitor} is a monitor task.
 * @author ecebgl
public final class MonitorsFactory {

  private static final Logger LOG = LoggerFactory.getLogger(MonitorsFactory.class);

  private MonitorsFactory() {
    throw new RuntimeException();

   * Build the monitors to be checked by the Message Bus Monitor.
   * @param messageBusM Message Bus Monitor object
   * @return the list of monitor tasks checked by Message Bus Monitor
   * @throws Exception .
  public static List<MonitorTask> getMonitors(final MessageBusMonitor messageBusM)
      throws Exception {
    final Builder<MonitorTask> bldr = ImmutableList.builder();
    if (messageBusM.getMessageBusTopicTest() != null) {
      bldr.add(new PublisherConsumerMonitor(messageBusM));"Created '{}' monitor", messageBusM.getMessageBusMonitorProps().getMonitorName());
    if (messageBusM.getQueryPmMetrics() != null) {
      bldr.add(new PmMetricsMonitor(messageBusM));
          "Created '{}' monitor",
1 Like

Hi @Banshchykova
Thanks for sharing that bit of code. Unfortunately, I cannot reproduce the issue with this sample.

To be able to able the confirm the bug, you could either:

  • Share a self-contained example (with the minimal amount of dependencies possible)
  • Point to the project where the file lives so that we can analyze in context
  • Provide all the dependencies imported in this file


Unfortunately can’t share more details due to NDA.
But, after testing on SonarQube Server 9.5 with SonarScanner version issues are not reproduced. So, the issue may be closed.
Thanks for you help!

1 Like