Skip to content

Commit

Permalink
Merge pull request #30 from varyvol/JENKINS-40981
Browse files Browse the repository at this point in the history
[FIXED JENKINS-40981] IllegalStateException when installing plugin
  • Loading branch information
imod committed Jan 13, 2017
2 parents 6d524f7 + 408bca7 commit 4be44b0
Showing 1 changed file with 2 additions and 2 deletions.
Expand Up @@ -17,7 +17,7 @@
*
* Created by domi on 17/09/16.
*/
@Extension
@Extension(ordinal = 5)
public class GlobalConfigFiles extends Descriptor<GlobalConfigFiles> implements ConfigFileStore, ExtensionPoint, Describable<GlobalConfigFiles> {

private Collection<Config> configs = new ArrayList<Config>();
Expand All @@ -27,7 +27,7 @@ public final Descriptor<GlobalConfigFiles> getDescriptor() {
}

public static GlobalConfigFiles get() {
GlobalConfigFiles instance = Jenkins.getActiveInstance().getDescriptorList(GlobalConfigFiles.class).get(GlobalConfigFiles.class);
GlobalConfigFiles instance = Jenkins.getActiveInstance().getExtensionList(GlobalConfigFiles.class).get(GlobalConfigFiles.class);
if (instance == null) { // TODO would be useful to have an ExtensionList.getOrFail
throw new IllegalStateException();
}
Expand Down

0 comments on commit 4be44b0

Please sign in to comment.