Skip to content

Commit

Permalink
fix: move code to its proper place in Job.java
Browse files Browse the repository at this point in the history
  • Loading branch information
krisstern committed Apr 9, 2024
1 parent e9529a0 commit 6be67f1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 26 deletions.
25 changes: 8 additions & 17 deletions core/src/main/java/hudson/model/Job.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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.
*
* <p>
* Every time it "runs", it will be recorded as a {@link Run} object.
Expand Down Expand Up @@ -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());
}
}
9 changes: 0 additions & 9 deletions core/src/main/java/jenkins/plugins/DetachedPluginsUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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 <em>detached plugins</em>.
Expand Down Expand Up @@ -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());
}
}

0 comments on commit 6be67f1

Please sign in to comment.