Skip to content

Commit

Permalink
Add Java 17 Serial annotation
Browse files Browse the repository at this point in the history
  • Loading branch information
MarkEWaite committed Nov 1, 2024
1 parent 5c8fb82 commit 8701daa
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
import hudson.model.Action;
import java.io.File;
import java.io.IOException;
import java.io.Serial;
import java.io.Serializable;
import java.util.UUID;
import java.util.logging.Level;
Expand All @@ -44,6 +45,7 @@
*/
public abstract class AbstractBadgeAction implements Action, Serializable {

@Serial
private static final long serialVersionUID = 1L;

private static final Logger LOGGER = Logger.getLogger(AbstractBadgeAction.class.getName());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,14 @@
package com.jenkinsci.plugins.badge.action;

import hudson.model.BuildBadgeAction;
import java.io.Serial;

/**
* Common action for badges.
*/
public class BadgeAction extends AbstractBadgeAction implements BuildBadgeAction {

@Serial
private static final long serialVersionUID = 1L;

public BadgeAction(String id, String icon, String text, String cssClass, String style, String link) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
*/
package com.jenkinsci.plugins.badge.action;

import java.io.Serial;
import org.apache.commons.lang.StringEscapeUtils;
import org.apache.commons.lang.StringUtils;
import org.jenkinsci.plugins.scriptsecurity.sandbox.whitelists.Whitelisted;
Expand All @@ -32,6 +33,7 @@
*/
public class BadgeSummaryAction extends AbstractBadgeAction {

@Serial
private static final long serialVersionUID = 1L;

public BadgeSummaryAction(String id, String icon, String text, String cssClass, String style, String link) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import hudson.model.Action;
import hudson.model.BuildBadgeAction;
import java.io.IOException;
import java.io.Serial;
import java.io.Serializable;
import java.util.logging.Level;
import java.util.logging.Logger;
Expand All @@ -40,7 +41,9 @@
@Deprecated(since = "2.0", forRemoval = true)
public class HtmlBadgeAction implements BuildBadgeAction, Action, Serializable {

@Serial
private static final long serialVersionUID = 1L;

private static final Logger LOGGER = Logger.getLogger(HtmlBadgeAction.class.getName());

private String id;
Expand Down

0 comments on commit 8701daa

Please sign in to comment.