Skip to content

Commit

Permalink
Merge pull request #147 from imonteroperez/junit-fix
Browse files Browse the repository at this point in the history
Bump BOM fo fix JUnit issues
  • Loading branch information
imonteroperez authored Sep 9, 2024
2 parents 713e680 + a957a59 commit fbcd755
Show file tree
Hide file tree
Showing 12 changed files with 49 additions and 6 deletions.
16 changes: 10 additions & 6 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,17 @@
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>plugin</artifactId>
<!-- Baseline Jenkins version you use to build and test the plugin. Users must have this version or newer to run. -->
<version>4.31</version>
<version>4.87</version>
<relativePath />
</parent>

<properties>
<changelist>999999-SNAPSHOT</changelist>
<jenkins.version>2.321</jenkins.version>
<jira-rest-client.version>5.2.2</jira-rest-client.version>
<jenkins.version>2.462</jenkins.version>
<jira-rest-client.version>5.2.6</jira-rest-client.version>
<fugue.version>3.0.0</fugue.version>
<spotbugs.failOnError>false</spotbugs.failOnError>
<java.level>8</java.level>
<java.level>11</java.level>
<gitHubRepo>jenkinsci/${project.artifactId}-plugin</gitHubRepo>
</properties>

Expand Down Expand Up @@ -118,8 +118,8 @@
<dependencies>
<dependency>
<groupId>io.jenkins.tools.bom</groupId>
<artifactId>bom-2.319.x</artifactId>
<version>1013.vf8058992a042</version>
<artifactId>bom-2.462.x</artifactId>
<version>3334.v18e2a_2f48356</version>
<scope>import</scope>
<type>pom</type>
</dependency>
Expand Down Expand Up @@ -156,6 +156,10 @@
<artifactId>jira-rest-java-client-core</artifactId>
<version>${jira-rest-client.version}</version>
<exclusions>
<exclusion>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
</exclusion>
<exclusion>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
import com.atlassian.jira.rest.client.internal.async.AsynchronousJiraRestClientFactory;

import edu.umd.cs.findbugs.annotations.CheckForNull;
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
import io.atlassian.util.concurrent.Promise;
import hudson.*;
import hudson.matrix.MatrixConfiguration;
Expand Down Expand Up @@ -416,6 +417,7 @@ public JiraTestDataPublisherDescriptor() {

private static final String DEFAULT_SUMMARY = "${TEST_FULL_NAME} : ${TEST_ERROR_DETAILS}";
private static final String DEFAULT_DESCRIPTION = "${BUILD_URL}${CRLF}${TEST_STACK_TRACE}";
@SuppressFBWarnings(value = "MS_MUTABLE_COLLECTION_PKGPROTECT")
public static final List<AbstractFields> templates;
public static final StringFields DEFAULT_SUMMARY_FIELD;
public static final StringFields DEFAULT_DESCRIPTION_FIELD;
Expand Down Expand Up @@ -587,6 +589,7 @@ public TestDataPublisher newInstance(StaplerRequest req, JSONObject json) throws
* @return
*/
@RequirePOST
@SuppressFBWarnings(value = "RCN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE")
public FormValidation doValidateGlobal(@QueryParameter String jiraUrl,
@QueryParameter String username,
@QueryParameter String password
Expand Down Expand Up @@ -684,6 +687,7 @@ public ListBoxModel doFillIssueTypeItems(@QueryParameter String projectKey) {
* @throws InterruptedException
*/
@JavaScriptMethod
@SuppressFBWarnings(value = {"NP_NULL_ON_SOME_PATH","WMI_WRONG_MAP_ITERATOR"})
public FormValidation validateFieldConfigs(String jsonForm) throws FormException, InterruptedException {
// extracting the configurations for associated with this plugin (we receive the entire form)
StaplerRequest req = Stapler.getCurrentRequest();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
*/
package org.jenkinsci.plugins.JiraTestResultReporter;

import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;

import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.google.gson.stream.JsonReader;
Expand Down Expand Up @@ -118,6 +120,7 @@ public List<AbstractFields> getConfigs() {
* See Java documentation for more details.
* @return this object
*/
@SuppressFBWarnings(value = "SE_PRIVATE_READ_RESOLVE_NOT_INHERITED")
private Object readResolve() {
compileIssueKeyPattern();
return this;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
*/
package org.jenkinsci.plugins.JiraTestResultReporter;

import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;

import com.atlassian.jira.rest.client.api.GetCreateIssueMetadataOptions;
import com.atlassian.jira.rest.client.api.IssueRestClient;
import com.atlassian.jira.rest.client.api.domain.CimFieldInfo;
Expand Down Expand Up @@ -123,6 +125,7 @@ public void removeCacheEntry(String projectKey, String issueType) {
* @param issueType
* @return
*/
@SuppressFBWarnings(value = "DCN_NULLPOINTER_EXCEPTION")
public CacheEntry getCacheEntry(String projectKey, String issueType) {
CacheEntry cacheEntry;
try{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
*/
package org.jenkinsci.plugins.JiraTestResultReporter;

import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;

import com.google.gson.Gson;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
Expand Down Expand Up @@ -64,6 +66,7 @@ private TestToIssueMapping() {
* @param job
* @param map
*/
@SuppressFBWarnings(value = "REC_CATCH_EXCEPTION")
private void saveMap(Job job, HashMap<String, String> map) {
try {
Gson gson = new Gson();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package org.jenkinsci.plugins.JiraTestResultReporter.api;

import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;

import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.google.gson.JsonElement;
Expand Down Expand Up @@ -34,6 +36,7 @@ public TestToIssueMappingApi() {
}

@Override
@SuppressFBWarnings(value = {"RCN_REDUNDANT_NULLCHECK_WOULD_HAVE_BEEN_A_NPE","NP_NULL_ON_SOME_PATH_FROM_RETURN_VALUE"})
public void doJson(StaplerRequest req, StaplerResponse rsp) throws IOException, ServletException {
String jobName = req.getParameter("job");
JsonElement result;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
*/
package org.jenkinsci.plugins.JiraTestResultReporter.config;

import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;

import com.atlassian.jira.rest.client.api.IdentifiableEntity;
import com.atlassian.jira.rest.client.api.NamedEntity;
import com.atlassian.jira.rest.client.api.domain.CustomFieldOption;
Expand All @@ -40,6 +42,7 @@
* Created by tuicu.
* Class for fields with predefined values, that can have multiple values (ex. Components, Fix Versions, etc.)
*/
@SuppressFBWarnings(value = {"DE_MIGHT_IGNORE","RE_CATCH_EXCEPTION"})
public class SelectableArrayFields extends AbstractFields {
public static final long serialVersionUID = 312389869891081321L;
private String fieldKey;
Expand Down Expand Up @@ -106,6 +109,7 @@ public FieldInput getFieldInput(TestResult test, EnvVars envVars) {
*/
@Symbol("jiraSelectableArrayField")
@Extension
@SuppressFBWarnings(value = {"DCN_NULLPOINTER_EXCEPTION","REC_CATCH_EXCEPTION"})
public static class SelectableArrayFieldsDescriptor extends Descriptor<AbstractFields> {

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
*/
package org.jenkinsci.plugins.JiraTestResultReporter.config;

import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;

import com.atlassian.jira.rest.client.api.IdentifiableEntity;
import com.atlassian.jira.rest.client.api.NamedEntity;
import com.atlassian.jira.rest.client.api.domain.CustomFieldOption;
Expand All @@ -36,6 +38,7 @@
* Created by tuicu.
* Class for fields with a single, predefined value (ex. Priority)
*/
@SuppressFBWarnings(value = "DC_NULLPOINTER_EXCEPTION")
public class SelectableFields extends AbstractFields {
public static final long serialVersionUID = 7570781225890517710L;
private String fieldKey;
Expand Down Expand Up @@ -96,6 +99,7 @@ public FieldInput getFieldInput(TestResult test, EnvVars envVars) {
*/
@Symbol("jiraSelectableField")
@Extension
@SuppressFBWarnings(value = "DCN_NULLPOINTER_EXCEPTION")
public static class SelectableFieldsDescriptor extends Descriptor<AbstractFields> {
@Override
public String getDisplayName() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
*/
package org.jenkinsci.plugins.JiraTestResultReporter.config;

import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;

import com.atlassian.jira.rest.client.api.domain.input.FieldInput;
import hudson.EnvVars;
import hudson.Extension;
Expand All @@ -36,6 +38,7 @@
* Created by tuicu.
* Class for fields that accept multiple string values
*/
@SuppressFBWarnings(value = "DC_NULLPOINTER_EXCEPTION")
public class StringArrayFields extends AbstractFields {
public static final long serialVersionUID = -8871121603596592222L;
private String fieldKey;
Expand Down Expand Up @@ -97,6 +100,7 @@ public Object readResolve() {
*/
@Symbol("jiraStringArrayField")
@Extension
@SuppressFBWarnings(value = "DCN_NULLPOINTER_EXCEPTION")
public static class StringArrayFieldsDescriptor extends Descriptor<AbstractFields> {

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
*/
package org.jenkinsci.plugins.JiraTestResultReporter.config;

import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;

import com.atlassian.jira.rest.client.api.domain.input.FieldInput;
import hudson.EnvVars;
import hudson.Extension;
Expand All @@ -33,6 +35,7 @@
* Created by tuicu.
* Class for fields that accept single string values
*/
@SuppressFBWarnings(value = "DC_NULLPOINTER_EXCEPTION")
public class StringFields extends AbstractFields {
public static final long serialVersionUID = 4298649925601364399L;
private static final ListBoxModel DEFAULT_MODEL;
Expand Down Expand Up @@ -95,6 +98,7 @@ public Object readResolve() {
*/
@Symbol("jiraStringField")
@Extension
@SuppressFBWarnings(value = "DCN_NULLPOINTER_EXCEPTION")
public static class StringFieldsDescriptor extends Descriptor<AbstractFields> {

@Override
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package org.jenkinsci.plugins.JiraTestResultReporter.config;

import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;

import com.atlassian.jira.rest.client.api.RestClientException;
import com.atlassian.jira.rest.client.api.UserRestClient;
import com.atlassian.jira.rest.client.api.domain.User;
Expand All @@ -22,6 +24,7 @@
* Created by tuicu on 17/08/16.
* Class for fields that accept user values
*/
@SuppressFBWarnings(value = "SE_NO_SERIALVERSIONID")
public class UserFields extends AbstractFields {
private String fieldKey;
private String value;
Expand Down Expand Up @@ -71,6 +74,7 @@ public Object readResolve() {

@Symbol("jiraUserField")
@Extension
@SuppressFBWarnings(value = "DCN_NULLPOINTER_EXCEPTION")
public static class UserFieldsDescriptor extends Descriptor<AbstractFields> {
@Override
public String getDisplayName() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,15 @@
*/
package org.jenkinsci.plugins.JiraTestResultReporter.restclientextensions;

import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;

import com.atlassian.jira.rest.client.api.domain.Status;

/**
* Created by tuicu.
* Extension of the Status object, that has information about status category
*/
@SuppressFBWarnings(value = "HE_EQUALS_NO_HASHCODE")
public class FullStatus extends Status {

private StatusCategory statusCategory;
Expand Down

0 comments on commit fbcd755

Please sign in to comment.