diff --git a/core/src/main/java/hudson/model/Job.java b/core/src/main/java/hudson/model/Job.java index 8c4e3183100a9..430a734eb1839 100644 --- a/core/src/main/java/hudson/model/Job.java +++ b/core/src/main/java/hudson/model/Job.java @@ -53,19 +53,7 @@ import hudson.search.SearchItems; import hudson.security.ACL; import hudson.tasks.LogRotator; -import hudson.util.AlternativeUiTextProvider; -import hudson.util.ChartUtil; -import hudson.util.ColorPalette; -import hudson.util.CopyOnWriteList; -import hudson.util.DataSetBuilder; -import hudson.util.DescribableList; -import hudson.util.FormApply; -import hudson.util.Graph; -import hudson.util.ProcessTree; -import hudson.util.RunList; -import hudson.util.ShiftedCategoryAxis; -import hudson.util.StackedAreaRenderer2; -import hudson.util.TextFile; +import hudson.util.*; import hudson.widgets.HistoryWidget; import hudson.widgets.HistoryWidget.Adapter; import hudson.widgets.Widget; @@ -120,15 +108,13 @@ import org.kohsuke.accmod.restrictions.NoExternalUse; import org.kohsuke.args4j.Argument; import org.kohsuke.args4j.CmdLineException; -import org.kohsuke.stapler.StaplerOverridable; -import org.kohsuke.stapler.StaplerRequest; -import org.kohsuke.stapler.StaplerResponse; +import org.kohsuke.stapler.*; import org.kohsuke.stapler.export.Exported; import org.kohsuke.stapler.interceptor.RequirePOST; import org.kohsuke.stapler.verb.POST; /** - * A job is an runnable entity under the monitoring of Hudson. + * A job is a runnable entity under the monitoring of Hudson. * *
* Every time it "runs", it will be recorded as a {@link Run} object. @@ -1618,4 +1604,9 @@ public BuildTimelineWidget getTimeline() { } private static final HexStringConfidentialKey SERVER_COOKIE = new HexStringConfidentialKey(Job.class, "serverCookie", 16); + + @Restricted(NoExternalUse.class) + public static FormValidation doCheckDisplayNameOrNull(@AncestorInPath AbstractProject, ?> project, @QueryParameter String value) { + return Jenkins.get().doCheckDisplayName(value, project.getName()); + } } diff --git a/core/src/main/java/jenkins/plugins/DetachedPluginsUtil.java b/core/src/main/java/jenkins/plugins/DetachedPluginsUtil.java index 4001c8fffe69f..68ee4480a611d 100644 --- a/core/src/main/java/jenkins/plugins/DetachedPluginsUtil.java +++ b/core/src/main/java/jenkins/plugins/DetachedPluginsUtil.java @@ -4,8 +4,6 @@ import edu.umd.cs.findbugs.annotations.NonNull; import hudson.ClassicPluginStrategy; import hudson.PluginWrapper; -import hudson.model.AbstractProject; -import hudson.util.FormValidation; import hudson.util.VersionNumber; import java.io.IOException; import java.io.InputStream; @@ -21,8 +19,6 @@ import org.apache.commons.io.IOUtils; import org.kohsuke.accmod.Restricted; import org.kohsuke.accmod.restrictions.NoExternalUse; -import org.kohsuke.stapler.AncestorInPath; -import org.kohsuke.stapler.QueryParameter; /** * Dedicated class to handle the logic related to so-called detached plugins. @@ -211,9 +207,4 @@ public String toString() { return shortName + " " + splitWhen.toString().replace(".*", "") + " " + requiredVersion; } } - - @Restricted(NoExternalUse.class) - public static FormValidation doCheckDisplayNameOrNull(@AncestorInPath AbstractProject, ?> project, @QueryParameter String value) { - return Jenkins.get().doCheckDisplayName(value, project.getName()); - } }