Skip to content

Commit

Permalink
Merge pull request #137 from MRamonLeon/fix-test-selectors-new-core
Browse files Browse the repository at this point in the history
  • Loading branch information
MRamonLeon authored Jul 7, 2021
2 parents 99548b3 + 966f192 commit 5fcd5b5
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 10 deletions.
6 changes: 3 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

<properties>
<maven.javadoc.skip>true</maven.javadoc.skip>
<jenkins.version>2.235.5</jenkins.version>
<jenkins.version>2.277</jenkins.version>
<java.level>8</java.level>
<hpi.compatibleSinceVersion>2.15</hpi.compatibleSinceVersion>
</properties>
Expand All @@ -54,8 +54,8 @@
<dependencies>
<dependency>
<groupId>io.jenkins.tools.bom</groupId>
<artifactId>bom-2.235.x</artifactId>
<version>19</version>
<artifactId>bom-2.277.x</artifactId>
<version>29</version>
<scope>import</scope>
<type>pom</type>
</dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,10 @@ public Config newConfig(@NonNull String id, String name, String comment, String

private void setField(String fieldName, String value, Config config) {
Field field = ReflectionUtils.findField(config.getClass(), fieldName);
field.setAccessible(true);
ReflectionUtils.setField(field, config, value);
if (field != null) {
field.setAccessible(true);
ReflectionUtils.setField(field, config, value);
}
}

public abstract void clearOldDataStorage();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
import hudson.model.Item;
import hudson.model.ItemGroup;
import jenkins.model.Jenkins;
import org.acegisecurity.AccessDeniedException;
import org.jenkinsci.lib.configprovider.model.Config;
import org.jenkinsci.plugins.configfiles.custom.CustomConfig;
import org.junit.Assert;
import org.junit.Rule;
import org.junit.Test;
import org.jvnet.hudson.test.JenkinsRule;
import org.jvnet.hudson.test.TestExtension;
import org.springframework.security.access.AccessDeniedException;

import javax.annotation.CheckForNull;
import java.io.File;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import hudson.security.Permission;
import hudson.util.ListBoxModel;
import jenkins.model.Jenkins;
import org.acegisecurity.AccessDeniedException;
import org.springframework.security.access.AccessDeniedException;
import org.jenkinsci.lib.configprovider.ConfigProvider;
import org.jenkinsci.lib.configprovider.model.Config;
import org.jenkinsci.plugins.configfiles.buildwrapper.ManagedFile;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@

import edu.umd.cs.findbugs.annotations.NonNull;
import hudson.security.Permission;
import org.acegisecurity.AccessDeniedException;

import org.springframework.security.access.AccessDeniedException;
import java.util.function.Supplier;

import static org.hamcrest.MatcherAssert.assertThat;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package org.jenkinsci.plugins.configfiles.sec;

import jenkins.model.Jenkins;
import org.acegisecurity.AccessDeniedException;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.jvnet.hudson.test.JenkinsRule;
import org.jvnet.hudson.test.MockAuthorizationStrategy;
import org.springframework.security.access.AccessDeniedException;

import java.util.function.Supplier;

Expand Down

0 comments on commit 5fcd5b5

Please sign in to comment.