Skip to content

Commit

Permalink
[JENKINS-29942] Make ChoiceListProvider Serializable.
Browse files Browse the repository at this point in the history
  • Loading branch information
ikedam committed Nov 26, 2015
1 parent 7029286 commit 652cf12
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 9 deletions.
Expand Up @@ -34,6 +34,8 @@
*/
public abstract class AddEditedChoiceListProvider extends ChoiceListProvider
{
private static final long serialVersionUID = 2844637600583498205L;

/**
* Used to Specify when to add a edited value
*/
Expand Down
Expand Up @@ -23,6 +23,7 @@
*/
package jp.ikedam.jenkins.plugins.extensible_choice_parameter;

import java.io.Serializable;
import java.util.List;
import hudson.ExtensionPoint;
import hudson.DescriptorExtensionList;
Expand All @@ -43,8 +44,10 @@
* <li>annotate the DescriptorImpl with Extension</li>
* </ol>
*/
abstract public class ChoiceListProvider extends AbstractDescribableImpl<ChoiceListProvider> implements ExtensionPoint
abstract public class ChoiceListProvider extends AbstractDescribableImpl<ChoiceListProvider> implements ExtensionPoint, Serializable
{
private static final long serialVersionUID = 8965389708210167871L;

/**
* Returns the choices.
*
Expand Down
Expand Up @@ -28,7 +28,6 @@
import hudson.util.FormValidation;

import java.io.File;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
Expand All @@ -45,7 +44,7 @@
/**
* Create a choice list from a list of files.
*/
public class FilenameChoiceListProvider extends ChoiceListProvider implements Serializable
public class FilenameChoiceListProvider extends ChoiceListProvider
{
private static final long serialVersionUID = 1329937323978223039L;

Expand Down
Expand Up @@ -23,7 +23,6 @@
*/
package jp.ikedam.jenkins.plugins.extensible_choice_parameter;

import java.io.Serializable;
import java.util.List;
import java.util.ArrayList;
import java.util.logging.Level;
Expand All @@ -45,7 +44,7 @@
* A choice provider whose choices are defined
* in the System Configuration page, and can be refereed from all jobs.
*/
public class GlobalTextareaChoiceListProvider extends AddEditedChoiceListProvider implements Serializable
public class GlobalTextareaChoiceListProvider extends AddEditedChoiceListProvider
{
private static final long serialVersionUID = 2L;
private static final String NoDefaultChoice = "###NODEFAULTCHOICE###";
Expand Down
Expand Up @@ -31,7 +31,6 @@
import hudson.util.FormValidation;
import hudson.util.ListBoxModel;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import java.util.logging.Level;
Expand All @@ -50,7 +49,7 @@
/**
* A choice provider whose choices are determined by a Groovy script.
*/
public class SystemGroovyChoiceListProvider extends ChoiceListProvider implements Serializable
public class SystemGroovyChoiceListProvider extends ChoiceListProvider
{
private static final long serialVersionUID = 2L;
private static final String NoDefaultChoice = "###NODEFAULTCHOICE###";
Expand Down
Expand Up @@ -24,7 +24,6 @@
package jp.ikedam.jenkins.plugins.extensible_choice_parameter;

import java.io.IOException;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import java.util.logging.Level;
Expand All @@ -43,7 +42,7 @@
/**
* A choice provider whose choices are defined as a text, like the build-in choice parameter.
*/
public class TextareaChoiceListProvider extends AddEditedChoiceListProvider implements Serializable
public class TextareaChoiceListProvider extends AddEditedChoiceListProvider
{
private static final long serialVersionUID = 2L;
private static final String NoDefaultChoice = "###NODEFAULTCHOICE###";
Expand Down
Expand Up @@ -149,6 +149,7 @@ public void testDescriptorDoCheckNameError()

public static class MockChoiceListProvider extends ChoiceListProvider
{
private static final long serialVersionUID = -8216066980119568526L;
private List<String> choiceList = null;
private String defaultChoice = null;
public MockChoiceListProvider(List<String> choiceList, String defaultChoice){
Expand Down Expand Up @@ -190,6 +191,7 @@ public String getDisplayName()

public static class EnableConfigurableMockChoiceListProvider extends ChoiceListProvider
{
private static final long serialVersionUID = 7643544327776225136L;
private List<String> choiceList = null;
private String defaultChoice = null;
public EnableConfigurableMockChoiceListProvider(List<String> choiceList, String defaultChoice){
Expand Down

0 comments on commit 652cf12

Please sign in to comment.