Skip to content

Commit

Permalink
Replace JSR-305 annotations with spotbugs annotations (#660)
Browse files Browse the repository at this point in the history
  • Loading branch information
MarkEWaite authored May 9, 2024
1 parent 6a75055 commit b6361ca
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
package org.jenkinsci.plugins.prometheus;

import com.cloudbees.simplediskusage.DiskItem;
import com.cloudbees.simplediskusage.JobDiskItem;
import com.cloudbees.simplediskusage.JobDiskItem;
import edu.umd.cs.findbugs.annotations.NonNull;
import io.prometheus.client.Collector;
import jenkins.model.Jenkins;
import org.jenkinsci.plugins.prometheus.collectors.CollectorFactory;
Expand All @@ -11,21 +12,20 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import javax.annotation.Nonnull;
import java.io.File;
import java.io.IOException;
import java.nio.file.FileStore;
import java.nio.file.Files;
import java.util.*;
import java.util.stream.Collectors;
import java.util.stream.Stream;

import java.util.stream.Stream;

public class DiskUsageCollector extends Collector {

private static final Logger LOGGER = LoggerFactory.getLogger(DiskUsageCollector.class);

@Override
@Nonnull
@NonNull
public List<MetricFamilySamples> collect() {

if (!PrometheusConfiguration.get().getCollectDiskUsage()) {
Expand All @@ -44,7 +44,7 @@ public List<MetricFamilySamples> collect() {
}
}

@Nonnull
@NonNull
private static List<MetricFamilySamples> collectDiskUsage() throws IOException {
final com.cloudbees.simplediskusage.QuickDiskUsagePlugin diskUsagePlugin = Jenkins.get()
.getPlugin(com.cloudbees.simplediskusage.QuickDiskUsagePlugin.class);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import javax.annotation.CheckForNull;
import edu.umd.cs.findbugs.annotations.CheckForNull;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
Expand Down

0 comments on commit b6361ca

Please sign in to comment.