Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EOL JSR 305 #1246

Merged
merged 1 commit into from
Jan 1, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
import org.jenkinsci.Symbol;
import org.kohsuke.stapler.StaplerRequest;

import javax.annotation.CheckForNull;
import javax.annotation.Nonnull;
import edu.umd.cs.findbugs.annotations.CheckForNull;
import edu.umd.cs.findbugs.annotations.NonNull;
import java.util.Map;

@Extension(dynamicLoadable = YesNoMaybe.YES)
Expand Down Expand Up @@ -97,7 +97,7 @@ public ListBoxModel doFillLookupStrategyItems() {
}

@Override
public Builder newInstance(@CheckForNull StaplerRequest req, @Nonnull JSONObject formData) throws FormException {
public Builder newInstance(@CheckForNull StaplerRequest req, @NonNull JSONObject formData) throws FormException {
ExecuteDslScripts builder = (ExecuteDslScripts) super.newInstance(req, formData);
builder.configure(req.findAncestorObject(Item.class));
return builder;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
import org.kohsuke.stapler.DataBoundConstructor;
import org.kohsuke.stapler.DataBoundSetter;

import javax.annotation.Nonnull;
import edu.umd.cs.findbugs.annotations.NonNull;
import java.io.FileInputStream;
import java.io.IOException;
import java.util.Collection;
Expand Down Expand Up @@ -307,8 +307,8 @@ private Object readResolve() {
* updated Jenkins jobs. The created / updated jobs are reported in the build result.
*/
@Override
public void perform(@Nonnull Run<?, ?> run, @Nonnull FilePath workspace, @Nonnull Launcher launcher,
@Nonnull TaskListener listener) throws InterruptedException, IOException {
public void perform(@NonNull Run<?, ?> run, @NonNull FilePath workspace, @NonNull Launcher launcher,
@NonNull TaskListener listener) throws InterruptedException, IOException {
try {
EnvVars env = run.getEnvironment(listener);
if (run instanceof AbstractBuild) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import javaposse.jobdsl.plugin.ExecuteDslScripts
import jenkins.model.Jenkins
import jenkins.model.TransientActionFactory

import javax.annotation.Nonnull
import edu.umd.cs.findbugs.annotations.NonNull

@Extension
class ApiViewerActionFactory extends TransientActionFactory<Project> {
Expand All @@ -17,7 +17,7 @@ class ApiViewerActionFactory extends TransientActionFactory<Project> {
}

@Override
Collection<? extends Action> createFor(@Nonnull Project target) {
Collection<? extends Action> createFor(@NonNull Project target) {
target.buildersList.contains(Jenkins.get().getDescriptor(ExecuteDslScripts)) ? [new ApiViewerAction()] : []
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import javaposse.jobdsl.plugin.SeedReference
import jenkins.model.Jenkins
import jenkins.model.TransientActionFactory

import javax.annotation.Nonnull
import edu.umd.cs.findbugs.annotations.NonNull

@Extension
class SeedJobTransientActionFactory extends TransientActionFactory<Item> {
Expand All @@ -17,9 +17,9 @@ class SeedJobTransientActionFactory extends TransientActionFactory<Item> {
Item
}

@Nonnull
@NonNull
@Override
Collection<? extends Action> createFor(@Nonnull Item target) {
Collection<? extends Action> createFor(@NonNull Item target) {
DescriptorImpl descriptor = Jenkins.get().getDescriptorByType(DescriptorImpl)
SeedReference seedReference = descriptor.generatedJobMap[target.fullName]
seedReference != null ? [new SeedJobAction(target, seedReference)] : []
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
import org.kohsuke.accmod.Restricted;
import org.kohsuke.accmod.restrictions.NoExternalUse;

import javax.annotation.CheckForNull;
import javax.annotation.Nonnull;
import edu.umd.cs.findbugs.annotations.CheckForNull;
import edu.umd.cs.findbugs.annotations.NonNull;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
Expand All @@ -33,7 +33,7 @@
@Restricted(NoExternalUse.class)
public class SeedJobConfigurator implements RootElementConfigurator<GeneratedItems[]> {

@Nonnull
@NonNull
@Override
public String getName() {
return "jobs";
Expand All @@ -45,7 +45,7 @@ public Class getTarget() {
return GeneratedItems[].class;
}

@Nonnull
@NonNull
@Override
@SuppressWarnings("unchecked")
public Set<Attribute<GeneratedItems[], ?>> describe() {
Expand All @@ -57,7 +57,7 @@ public GeneratedItems[] getTargetComponent(ConfigurationContext context) {
return new GeneratedItems[0]; // Doesn't really make sense
}

@Nonnull
@NonNull
@Override
public GeneratedItems[] configure(CNode config, ConfigurationContext context) throws ConfiguratorException {
Map<String, String> env = new HashMap<>(System.getenv());
Expand All @@ -76,7 +76,7 @@ public GeneratedItems[] check(CNode config, ConfigurationContext context) {
return new GeneratedItems[0];
}

@Nonnull
@NonNull
@Override
public List<Configurator<GeneratedItems[]>> getConfigurators(ConfigurationContext context) {
return Collections.singletonList(context.lookup(ScriptSource.class));
Expand Down