Skip to content

Commit

Permalink
Fix JENKINS-56237 IllegalArgumentException: providerId can NOT be nul…
Browse files Browse the repository at this point in the history
…l when using npmConfig
  • Loading branch information
nfalco79 committed Feb 22, 2019
1 parent 5804311 commit 68c56cd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions pom.xml
Expand Up @@ -44,7 +44,7 @@
<properties>
<powermock.version>1.7.3</powermock.version>
<jenkins.version>2.60.3</jenkins.version>
<java.level>7</java.level>
<java.level>8</java.level>
</properties>

<dependencies>
Expand All @@ -56,7 +56,7 @@
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>config-file-provider</artifactId>
<version>2.16.4</version>
<version>3.5</version>
</dependency>
<dependency>
<groupId>org.powermock</groupId>
Expand Down
Expand Up @@ -60,8 +60,8 @@ public class NPMConfig extends Config {
private final List<NPMRegistry> registries;

@DataBoundConstructor
public NPMConfig(@Nonnull String id, String name, String comment, String content, @Nonnull String providerId, List<NPMRegistry> registries) {
super(id, Util.fixEmptyAndTrim(name), Util.fixEmptyAndTrim(comment), Util.fixEmptyAndTrim(content), providerId);
public NPMConfig(@Nonnull String id, String name, String comment, String content, List<NPMRegistry> registries) {
super(id, Util.fixEmptyAndTrim(name), Util.fixEmptyAndTrim(comment), Util.fixEmptyAndTrim(content));
this.registries = registries == null ? new ArrayList<NPMRegistry>(3) : registries;
}

Expand Down Expand Up @@ -113,7 +113,7 @@ public String getDisplayName() {

@Override
public Config newConfig(@Nonnull String configId) {
return new NPMConfig(configId, "MyNpmrcConfig", "user config", loadTemplateContent(), getProviderId(), null);
return new NPMConfig(configId, "MyNpmrcConfig", "user config", loadTemplateContent(), null);
}

protected String loadTemplateContent() {
Expand Down

0 comments on commit 68c56cd

Please sign in to comment.