Uploaded image for project: 'SonarQube Scanner API'
  1. SonarQube Scanner API
  2. SCANNERAPI-58

EnvironmentInformation is badly initialized

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.2.2
    • Fix Version/s: 2.3
    • Component/s: None
    • Labels:
      None

      Description

      When using SonarEmbedder:

      EmbeddedRunner runner = EmbeddedRunner.create()
              .setApp("Maven", getMavenVersion());
      

      we could expect the EnvironmentInformation contains provided values but it is not the case as there is a property name mismatch.

      In IsolatedLauncher:

      EnvironmentInformation env = new EnvironmentInformation(properties.getProperty("sonarRunner.userAgent"), properties.getProperty("sonarRunner.userAgentVersion"));
      

      In Runner:

      public T setApp(String app, String version) {
          setProperty(InternalProperties.RUNNER_APP, app);
          setProperty(InternalProperties.RUNNER_APP_VERSION, version);
          return (T) this;
      }
      

      InternalProperties:

        String RUNNER_APP = "sonarRunner.app";
        String RUNNER_APP_VERSION = "sonarRunner.appVersion";
      

      There is a property name mismatch.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              henryju OLD - Julien HENRY
              Reporter:
              henryju OLD - Julien HENRY
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: