Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix SpotBugs issues + Fix the default Java versioncapturing in PluginCompatTesterConfig#getTestJavaVersion() when other options are disabled #203

Merged
merged 10 commits into from
Dec 24, 2019

Commits on Oct 11, 2019

  1. Fix OS_OPEN_STREAM SpotBugs issues

        [ERROR] org.jenkins.tools.test.maven.ExternalMavenRunner.run(MavenRunner$Config, File, File, String[]) may fail to close stream [org.jenkins.tools.test.maven.ExternalMavenRunner] At ExternalMavenRunner.java:[line 46] OS_OPEN_STREAM
        [ERROR] org.jenkins.tools.test.PluginCompatTester.addSplitPluginDependencies(String, MavenRunner$Config, File, MavenPom, Map, Map, String, List) may fail to close stream [org.jenkins.tools.test.PluginCompatTester] At PluginCompatTester.java:[line 707] OS_OPEN_STREAM
    basil committed Oct 11, 2019
    Configuration menu
    Copy the full SHA
    b8d376a View commit details
    Browse the repository at this point in the history
  2. Fix DM_DEFAULT_ENCODING SpotBugs issues

        [ERROR] Found reliance on default encoding in new org.jenkins.tools.test.logging.SystemIOLoggerFilter$SystemIOWrapper(SystemIOLoggerFilter, PrintStream): new org.jenkins.tools.test.logging.SystemIOLoggerFilter$SystemIOWrapper(OutputStream) [org.jenkins.tools.test.logging.SystemIOLoggerFilter$SystemIOWrapper] At SystemIOLoggerFilter.java:[line 58] DM_DEFAULT_ENCODING
        [ERROR] Found reliance on default encoding in org.jenkins.tools.test.maven.ExternalMavenRunner.run(MavenRunner$Config, File, File, String[]): new java.io.InputStreamReader(InputStream) [org.jenkins.tools.test.maven.ExternalMavenRunner] At ExternalMavenRunner.java:[line 46] DM_DEFAULT_ENCODING
        [ERROR] Found reliance on default encoding in org.jenkins.tools.test.maven.ExternalMavenRunner.run(MavenRunner$Config, File, File, String[]): new java.io.PrintWriter(OutputStream) [org.jenkins.tools.test.maven.ExternalMavenRunner] At ExternalMavenRunner.java:[line 43] DM_DEFAULT_ENCODING
        [ERROR] Found reliance on default encoding in org.jenkins.tools.test.model.MavenPom.writeDocument(File, Document): new java.io.FileWriter(File) [org.jenkins.tools.test.model.MavenPom] At MavenPom.java:[line 247] DM_DEFAULT_ENCODING
        [ERROR] Found reliance on default encoding in org.jenkins.tools.test.model.PluginCompatReport.save(File): new java.io.FileWriter(File) [org.jenkins.tools.test.model.PluginCompatReport] At PluginCompatReport.java:[line 87] DM_DEFAULT_ENCODING
        [ERROR] Found reliance on default encoding in org.jenkins.tools.test.model.PluginRemoting.retrievePomContentFromHpi(): new String(byte[], int, int) [org.jenkins.tools.test.model.PluginRemoting] At PluginRemoting.java:[line 92] DM_DEFAULT_ENCODING
        [ERROR] Found reliance on default encoding in org.jenkins.tools.test.PluginCompatTester.addSplitPluginDependencies(String, MavenRunner$Config, File, MavenPom, Map, Map, String, List): new java.io.FileReader(File) [org.jenkins.tools.test.PluginCompatTester] At PluginCompatTester.java:[line 706] DM_DEFAULT_ENCODING
    basil committed Oct 11, 2019
    Configuration menu
    Copy the full SHA
    d0824b8 View commit details
    Browse the repository at this point in the history
  3. Fix SE_COMPARATOR_SHOULD_BE_SERIALIZABLE SpotBugs issues

        [ERROR] org.jenkins.tools.test.model.comparators.MavenCoordinatesComparator implements Comparator but not Serializable [org.jenkins.tools.test.model.comparators.MavenCoordinatesComparator] At MavenCoordinatesComparator.java:[lines 37-40] SE_COMPARATOR_SHOULD_BE_SERIALIZABLE
        [ERROR] org.jenkins.tools.test.model.comparators.VersionComparator implements Comparator but not Serializable [org.jenkins.tools.test.model.comparators.VersionComparator] At VersionComparator.java:[lines 35-74] SE_COMPARATOR_SHOULD_BE_SERIALIZABLE
    basil committed Oct 11, 2019
    Configuration menu
    Copy the full SHA
    c6d6684 View commit details
    Browse the repository at this point in the history
  4. Fix DLS_DEAD_LOCAL_STORE SpotBugs issue

        [ERROR] Dead store to javaVersionOutput2 in org.jenkins.tools.test.model.PluginCompatTesterConfig.getTestJavaVersion() [org.jenkins.tools.test.model.PluginCompatTesterConfig] At PluginCompatTesterConfig.java:[line 346] DLS_DEAD_LOCAL_STORE
    basil committed Oct 11, 2019
    Configuration menu
    Copy the full SHA
    4837fda View commit details
    Browse the repository at this point in the history
  5. Fix UC_USELESS_OBJECT SpotBugs issue

        [ERROR] Useless object stored in variable pluginGroupIds of method org.jenkins.tools.test.PluginCompatTester.scanWAR(File, Map, String) [org.jenkins.tools.test.PluginCompatTester] At PluginCompatTester.java:[line 620] UC_USELESS_OBJECT
    basil committed Oct 11, 2019
    Configuration menu
    Copy the full SHA
    618b0bd View commit details
    Browse the repository at this point in the history
  6. Suppress NP_NULL_ON_SOME_PATH_FROM_RETURN_VALUE SpotBugs issues

        [ERROR] Possible null pointer dereference in org.jenkins.tools.test.PluginCompatTesterCli.main(String[]) due to return value of called method [org.jenkins.tools.test.PluginCompatTesterCli, org.jenkins.tools.test.PluginCompatTesterCli] Dereferenced at PluginCompatTesterCli.java:[line 127]Known null at PluginCompatTesterCli.java:[line 127] NP_NULL_ON_SOME_PATH_FROM_RETURN_VALUE
        [ERROR] Possible null pointer dereference in org.jenkins.tools.test.PluginCompatTesterCli.main(String[]) due to return value of called method [org.jenkins.tools.test.PluginCompatTesterCli, org.jenkins.tools.test.PluginCompatTesterCli] Dereferenced at PluginCompatTesterCli.java:[line 135]Known null at PluginCompatTesterCli.java:[line 135] NP_NULL_ON_SOME_PATH_FROM_RETURN_VALUE
        [ERROR] Possible null pointer dereference in org.jenkins.tools.test.PluginCompatTesterCli.main(String[]) due to return value of called method [org.jenkins.tools.test.PluginCompatTesterCli, org.jenkins.tools.test.PluginCompatTesterCli] Dereferenced at PluginCompatTesterCli.java:[line 141]Known null at PluginCompatTesterCli.java:[line 141] NP_NULL_ON_SOME_PATH_FROM_RETURN_VALUE
    basil committed Oct 11, 2019
    Configuration menu
    Copy the full SHA
    ce96474 View commit details
    Browse the repository at this point in the history
  7. Suppress REC_CATCH_EXCEPTION SpotBugs issue

        [ERROR] Exception is caught when Exception is not thrown in org.jenkins.tools.test.hook.MultiParentCompileHook.action(Map) [org.jenkins.tools.test.hook.MultiParentCompileHook] At MultiParentCompileHook.java:[line 68] REC_CATCH_EXCEPTION
    basil committed Oct 11, 2019
    Configuration menu
    Copy the full SHA
    376276f View commit details
    Browse the repository at this point in the history
  8. Enable SpotBugs by default

    basil committed Oct 11, 2019
    Configuration menu
    Copy the full SHA
    7cdfb6a View commit details
    Browse the repository at this point in the history

Commits on Dec 17, 2019

  1. Configuration menu
    Copy the full SHA
    180e865 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    fc4ba4d View commit details
    Browse the repository at this point in the history