Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

private readResolve not honored by subtypes #220

Merged
merged 3 commits into from
Sep 30, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .mvn/extensions.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<extensions xmlns="http://maven.apache.org/EXTENSIONS/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/EXTENSIONS/1.0.0 http://maven.apache.org/xsd/core-extensions-1.0.0.xsd">
<extension>
<groupId>io.jenkins.tools.incrementals</groupId>
<artifactId>git-changelist-maven-extension</artifactId>
<version>1.2</version>
</extension>
</extensions>
2 changes: 2 additions & 0 deletions .mvn/maven.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
-Pconsume-incrementals
-Pmight-produce-incrementals
17 changes: 11 additions & 6 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
<parent>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>plugin</artifactId>
<version>4.3</version>
<version>4.8</version>
<relativePath />
</parent>

<licenses>
Expand All @@ -17,7 +18,7 @@

<artifactId>email-ext</artifactId>
<packaging>hpi</packaging>
<version>2.77-SNAPSHOT</version>
<version>${revision}${changelist}</version>
<name>Email Extension Plugin</name>
<description>Allows to configure every aspect of email notifications: when an email is sent, who should receive it and what the email says</description>
<url>https://github.com/jenkinsci/email-ext-plugin</url>
Expand All @@ -27,6 +28,9 @@
</issueManagement>

<properties>
<revision>2.77</revision>
<changelist>-SNAPSHOT</changelist>
<gitHubRepo>jenkinsci/email-ext-plugin</gitHubRepo>
<java.level>8</java.level>
<jenkins.version>2.164.3</jenkins.version>
<hpi.compatibleSinceVersion>2.57.2</hpi.compatibleSinceVersion>
Expand Down Expand Up @@ -315,9 +319,10 @@
</dependencies>

<scm>
<connection>scm:git:https://github.com/jenkinsci/email-ext-plugin.git</connection>
<developerConnection>scm:git:[email protected]:jenkinsci/email-ext-plugin.git</developerConnection>
<tag>HEAD</tag>
<connection>scm:git:https://github.com/${gitHubRepo}.git</connection>
<developerConnection>scm:git:[email protected]:${gitHubRepo}.git</developerConnection>
<url>https://github.com/${gitHubRepo}</url>
<tag>${scmTag}</tag>
</scm>

<repositories>
Expand Down Expand Up @@ -375,4 +380,4 @@
</pluginRepository>
</pluginRepositories>

</project>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ private Object evaluate(AbstractBuild<?, ?> build, TaskListener listener) throws
* @throws ObjectStreamException if the object cannot be restored.
* @see <a href="http://download.oracle.com/javase/1.3/docs/guide/serialization/spec/input.doc6.html">The Java Object Serialization Specification</a>
*/
private Object readResolve() throws ObjectStreamException {
protected Object readResolve() throws ObjectStreamException {
if (triggerScript != null && secureTriggerScript == null) {
this.secureTriggerScript = new SecureGroovyScript(triggerScript, false, null);
this.secureTriggerScript.configuring(ApprovalContext.create());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
import org.apache.commons.io.IOUtils;
import org.jenkinsci.plugins.scriptsecurity.scripts.ScriptApproval;
import org.junit.*;
import org.junit.rules.TestName;
import org.jvnet.hudson.test.BuildWatcher;
import org.jvnet.hudson.test.FailureBuilder;
import org.jvnet.hudson.test.Issue;
Expand Down Expand Up @@ -84,6 +85,8 @@ public class ExtendedEmailPublisherTest {
public static JenkinsRule j = new JenkinsRule();
private AuthorizationStrategy oldAuthorizationStrategy;
private SecurityRealm oldSecurityRealm;
@Rule
public TestName testName = new TestName();

@Before
public void before() throws Throwable {
Expand All @@ -102,7 +105,7 @@ public void before() throws Throwable {
publisher.setPresendScript("");
publisher.setPostsendScript("");

project = j.createFreeStyleProject();
project = j.createFreeStyleProject(testName.getMethodName());
project.getPublishersList().add(publisher);

recProviders = Collections.emptyList();
Expand Down