Skip to content

Commit

Permalink
spotbugs
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewazores committed Mar 22, 2024
1 parent 9ba8eb0 commit 5293d25
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/main/java/io/cryostat/discovery/Discovery.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
import java.util.Optional;
import java.util.Set;
import java.util.UUID;
import java.util.regex.Pattern;

import io.cryostat.credentials.Credential;
import io.cryostat.discovery.DiscoveryPlugin.PluginCallback;
Expand All @@ -43,6 +42,7 @@
import com.fasterxml.jackson.databind.ObjectMapper;
import com.nimbusds.jose.JOSEException;
import com.nimbusds.jwt.proc.BadJWTException;
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
import io.quarkus.runtime.ShutdownEvent;
import io.quarkus.runtime.StartupEvent;
import io.smallrye.common.annotation.Blocking;
Expand Down Expand Up @@ -88,8 +88,6 @@
@Path("")
public class Discovery {

public static final Pattern HOST_PORT_PAIR_PATTERN =
Pattern.compile("^([^:\\s]+)(?::(\\d{1,5}))$");
static final String X_FORWARDED_FOR = "X-Forwarded-For";

private static final String JOB_PERIODIC = "periodic";
Expand Down Expand Up @@ -389,6 +387,7 @@ static class RefreshPluginJob implements Job {
@Override
@Transactional
@Blocking
@SuppressFBWarnings("RCN_REDUNDANT_NULLCHECK_OF_NULL_VALUE")
public void execute(JobExecutionContext context) throws JobExecutionException {
DiscoveryPlugin plugin = null;
try {
Expand Down
2 changes: 2 additions & 0 deletions src/main/java/io/cryostat/discovery/DiscoveryPlugin.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import io.cryostat.credentials.Credential;

import com.fasterxml.jackson.annotation.JsonProperty;
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
import io.quarkus.hibernate.orm.panache.PanacheEntityBase;
import io.quarkus.rest.client.reactive.QuarkusRestClientBuilder;
import jakarta.enterprise.context.ApplicationScoped;
Expand Down Expand Up @@ -136,6 +137,7 @@ public static class DiscoveryPluginAuthorizationHeaderFactory

private final DiscoveryPlugin plugin;

@SuppressFBWarnings("EI_EXPOSE_REP2")
public DiscoveryPluginAuthorizationHeaderFactory(DiscoveryPlugin plugin) {
this.plugin = plugin;
}
Expand Down

0 comments on commit 5293d25

Please sign in to comment.