Skip to content

Commit

Permalink
Suppress new SpotBugs rule for backward compatibility
Browse files Browse the repository at this point in the history
Rule: PA_PUBLIC_PRIMITIVE_ATTRIBUTE
  • Loading branch information
sghill committed Aug 12, 2024
1 parent 70f517b commit 06f79fe
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package hudson.plugins.jira;

import edu.umd.cs.findbugs.annotations.NonNull;
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
import hudson.Extension;
import hudson.util.PersistedList;
import java.util.List;
Expand All @@ -16,6 +17,7 @@ public static JiraGlobalConfiguration get() {
return (JiraGlobalConfiguration) Jenkins.get().getDescriptorOrDie(JiraGlobalConfiguration.class);
}

@SuppressFBWarnings(value = "PA_PUBLIC_PRIMITIVE_ATTRIBUTE", justification = "Backwards compatibility")
public List<JiraSite> sites = new PersistedList<>(this);

public JiraGlobalConfiguration() {
Expand Down
14 changes: 14 additions & 0 deletions src/main/java/hudson/plugins/jira/JiraSite.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
import edu.umd.cs.findbugs.annotations.CheckForNull;
import edu.umd.cs.findbugs.annotations.NonNull;
import edu.umd.cs.findbugs.annotations.Nullable;
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
import hudson.Extension;
import hudson.Util;
import hudson.model.AbstractDescribableImpl;
Expand Down Expand Up @@ -125,21 +126,25 @@ public class JiraSite extends AbstractDescribableImpl<JiraSite> {
* URL of Jira for normal access, like {@code http://jira.codehaus.org/}.
* Mandatory. Normalized to end with '/'
*/
@SuppressFBWarnings(value = "PA_PUBLIC_PRIMITIVE_ATTRIBUTE", justification = "Backwards compatibility")
public URL alternativeUrl;

/**
* Jira requires HTTP Authentication for login
*/
@SuppressFBWarnings(value = "PA_PUBLIC_PRIMITIVE_ATTRIBUTE", justification = "Backwards compatibility")
public boolean useHTTPAuth;

/**
* The id of the credentials to use. Optional.
*/
@SuppressFBWarnings(value = "PA_PUBLIC_PRIMITIVE_ATTRIBUTE", justification = "Backwards compatibility")
public String credentialsId;

/**
* Jira requires Bearer Authentication for login
*/
@SuppressFBWarnings(value = "PA_PUBLIC_PRIMITIVE_ATTRIBUTE", justification = "Backwards compatibility")
public boolean useBearerAuth;

/**
Expand All @@ -159,30 +164,35 @@ public class JiraSite extends AbstractDescribableImpl<JiraSite> {
/**
* Group visibility to constrain the visibility of the added comment. Optional.
*/
@SuppressFBWarnings(value = "PA_PUBLIC_PRIMITIVE_ATTRIBUTE", justification = "Backwards compatibility")
public String groupVisibility;

/**
* Role visibility to constrain the visibility of the added comment. Optional.
*/
@SuppressFBWarnings(value = "PA_PUBLIC_PRIMITIVE_ATTRIBUTE", justification = "Backwards compatibility")
public String roleVisibility;

/**
* True if this Jira is configured to allow Confluence-style Wiki comment.
*/
@SuppressFBWarnings(value = "PA_PUBLIC_PRIMITIVE_ATTRIBUTE", justification = "Backwards compatibility")
public boolean supportsWikiStyleComment;

/**
* to record scm changes in jira issue
*
* @since 1.21
*/
@SuppressFBWarnings(value = "PA_PUBLIC_PRIMITIVE_ATTRIBUTE", justification = "Backwards compatibility")
public boolean recordScmChanges;

/**
* Disable annotating the changelogs
*
* @since todo
*/
@SuppressFBWarnings(value = "PA_PUBLIC_PRIMITIVE_ATTRIBUTE", justification = "Backwards compatibility")
public boolean disableChangelogAnnotations;

/**
Expand All @@ -199,23 +209,27 @@ public class JiraSite extends AbstractDescribableImpl<JiraSite> {
*
* @since 1.22
*/
@SuppressFBWarnings(value = "PA_PUBLIC_PRIMITIVE_ATTRIBUTE", justification = "Backwards compatibility")
public boolean updateJiraIssueForAllStatus;

/**
* connection timeout used when calling jira rest api, in seconds
*/
@SuppressFBWarnings(value = "PA_PUBLIC_PRIMITIVE_ATTRIBUTE", justification = "Backwards compatibility")
public int timeout = DEFAULT_TIMEOUT;

/**
* response timeout for jira rest call
* @since 3.0.3
*/
@SuppressFBWarnings(value = "PA_PUBLIC_PRIMITIVE_ATTRIBUTE", justification = "Backwards compatibility")
private int readTimeout = DEFAULT_READ_TIMEOUT;

/**
* thread pool number
* @since 3.0.3
*/
@SuppressFBWarnings(value = "PA_PUBLIC_PRIMITIVE_ATTRIBUTE", justification = "Backwards compatibility")
private int threadExecutorNumber = DEFAULT_THREAD_EXECUTOR_NUMBER;

/**
Expand Down

0 comments on commit 06f79fe

Please sign in to comment.