Skip to content

Commit

Permalink
Merge pull request #193 from aneveux/fix-jsr-305
Browse files Browse the repository at this point in the history
  • Loading branch information
Vlatombe authored Mar 3, 2023
2 parents 9c8e274 + b8bf333 commit 988e0ce
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,11 @@
import jenkins.model.Jenkins;
import org.apache.commons.lang.StringUtils;

import javax.annotation.CheckForNull;
import javax.annotation.Nullable;
import java.util.Collections;

import edu.umd.cs.findbugs.annotations.CheckForNull;
import edu.umd.cs.findbugs.annotations.Nullable;

/**
* @author <a href="mailto:[email protected]">Nicolas De Loof</a>
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,22 +28,23 @@
import org.jenkinsci.plugins.variant.OptionalExtension;
import org.jenkinsci.plugins.pipeline.modeldefinition.model.CredentialsBindingHandler;

import javax.annotation.Nonnull;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import edu.umd.cs.findbugs.annotations.NonNull;

@OptionalExtension(requirePlugins = "pipeline-model-extensions")
public class AWSDeclarativeCredentialsHandler extends CredentialsBindingHandler<AmazonWebServicesCredentials> {

@Nonnull
@NonNull
@Override
public Class<? extends StandardCredentials> type() {
return AmazonWebServicesCredentials.class;
}

@Nonnull
@NonNull
@Override
public List<Map<String, Object>> getWithCredentialsParameters(String credentialsId) {
Map<String, Object> map = new HashMap<>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@
import org.kohsuke.stapler.DataBoundConstructor;
import org.kohsuke.stapler.DataBoundSetter;

import javax.annotation.Nonnull;
import java.io.IOException;
import java.util.Arrays;
import java.util.HashMap;
Expand Down Expand Up @@ -115,7 +114,8 @@ protected Class<AmazonWebServicesCredentials> type() {
}

@Override
public MultiEnvironment bind(@Nonnull Run<?, ?> build, FilePath workspace, Launcher launcher, TaskListener listener) throws IOException, InterruptedException {
public MultiEnvironment bind(@NonNull Run<?, ?> build, FilePath workspace, Launcher launcher, TaskListener listener) throws IOException,
InterruptedException {
AWSCredentialsProvider provider = getCredentials(build);
if (!StringUtils.isEmpty(this.roleArn)) {
provider = this.assumeRoleProvider(provider);
Expand Down

0 comments on commit 988e0ce

Please sign in to comment.