Skip to content

Commit

Permalink
Merge pull request #24 from jenkinsci/secret-supplier-serializable
Browse files Browse the repository at this point in the history
Make SecretSupplier serializable
  • Loading branch information
tylrd authored Oct 29, 2020
2 parents f9a3969 + c1a94ec commit 22bed2f
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import com.cloudbees.plugins.credentials.SecretBytes;
import com.cloudbees.plugins.credentials.common.StandardCredentials;
import hudson.util.Secret;
import java.io.Serializable;
import java.util.Map;
import java.util.Optional;
import java.util.function.Supplier;
Expand Down Expand Up @@ -41,7 +42,9 @@ public static Optional<StandardCredentials> create(
}
}

private static class SecretBytesSupplier implements Supplier<SecretBytes> {
private static class SecretBytesSupplier implements Supplier<SecretBytes>, Serializable {

private static final long serialVersionUID = 1L;

private final String id;
private final transient SecretGetter secretGetter;
Expand All @@ -57,7 +60,9 @@ public SecretBytes get() {
}
}

private static class SecretSupplier implements Supplier<Secret> {
private static class SecretSupplier implements Supplier<Secret>, Serializable {

private static final long serialVersionUID = 1L;

private final String id;
private final transient SecretGetter secretGetter;
Expand Down

0 comments on commit 22bed2f

Please sign in to comment.