diff --git a/.stylelintrc.js b/.stylelintrc.js
index c73ee6eecfe9..50820909fbe2 100644
--- a/.stylelintrc.js
+++ b/.stylelintrc.js
@@ -1,6 +1,5 @@
module.exports = {
- extends: "stylelint-config-standard",
- customSyntax: "postcss-scss",
+ extends: "stylelint-config-standard-scss",
ignoreFiles: ["src/main/scss/_bootstrap.scss"],
rules: {
"no-descending-specificity": null,
@@ -14,23 +13,8 @@ module.exports = {
},
],
"property-no-vendor-prefix": null,
- "at-rule-no-unknown": [
- true,
- {
- ignoreAtRules: [
- "function",
- "if",
- "each",
- "include",
- "mixin",
- "for",
- "use",
- ],
- },
- ],
"alpha-value-notation": "number",
"number-max-precision": 5,
- "function-no-unknown": null,
"no-duplicate-selectors": null,
"hue-degree-notation": "number",
},
diff --git a/ath.sh b/ath.sh
index 3f6bca7f61bf..965255834081 100644
--- a/ath.sh
+++ b/ath.sh
@@ -6,7 +6,7 @@ set -o xtrace
cd "$(dirname "$0")"
# https://github.com/jenkinsci/acceptance-test-harness/releases
-export ATH_VERSION=6107.v8c73fa_b_8f784
+export ATH_VERSION=6133.v358d9a_47674f
if [[ $# -eq 0 ]]; then
export JDK=17
diff --git a/bom/pom.xml b/bom/pom.xml
index d2912addc6a4..f5fb0dad03ff 100644
--- a/bom/pom.xml
+++ b/bom/pom.xml
@@ -63,7 +63,7 @@ THE SOFTWARE.
org.springframeworkspring-framework-bom
- 6.2.1
+ 6.2.2pomimport
@@ -91,17 +91,6 @@ THE SOFTWARE.
guava33.4.0-jre
-
-
- com.jcraft
- jzlib
- 1.1.3-kohsuke-1
-
-
- com.sun.solaris
- embedded_su4j
- 1.1
- com.sun.xml.txw2txw2
@@ -120,7 +109,7 @@ THE SOFTWARE.
commons-codeccommons-codec
- 1.17.2
+ 1.18.0commons-collections
@@ -137,11 +126,6 @@ THE SOFTWARE.
commons-lang2.6
-
- io.jenkins.stapler
- jenkins-stapler-support
- 1.1
- jakarta.servletjakarta.servlet-api
@@ -323,11 +307,6 @@ THE SOFTWARE.
windows-package-checker1.2
-
- org.kohsuke.jinterop
- j-interop
- 2.0.8-kohsuke-1
- org.kohsuke.metainf-servicesmetainf-services
@@ -359,11 +338,6 @@ THE SOFTWARE.
asm9.7.1
-
- org.samba.jcifs
- jcifs
- 1.3.18-kohsuke-1
- commons-logging
diff --git a/cli/src/main/java/hudson/cli/CLI.java b/cli/src/main/java/hudson/cli/CLI.java
index 910331b3ee9a..988e9f1635c7 100644
--- a/cli/src/main/java/hudson/cli/CLI.java
+++ b/cli/src/main/java/hudson/cli/CLI.java
@@ -343,17 +343,20 @@ public void onOpen(Session session, EndpointConfig config) {}
class Authenticator extends ClientEndpointConfig.Configurator {
HandshakeResponse hr;
+
@Override
public void beforeRequest(Map> headers) {
if (factory.authorization != null) {
headers.put("Authorization", List.of(factory.authorization));
}
}
+
@Override
public void afterResponse(HandshakeResponse hr) {
this.hr = hr;
}
}
+
var authenticator = new Authenticator();
ClientManager client = ClientManager.createClient(JdkClientContainer.class.getName()); // ~ ContainerProvider.getWebSocketContainer()
diff --git a/core/pom.xml b/core/pom.xml
index 2f5745023595..4c49c99bf807 100644
--- a/core/pom.xml
+++ b/core/pom.xml
@@ -116,15 +116,6 @@ THE SOFTWARE.
bridge-method-annotation${bridge-method-injector.version}
-
-
- com.jcraft
- jzlib
-
-
- com.sun.solaris
- embedded_su4j
- com.sun.xml.txw2txw2
@@ -171,10 +162,6 @@ THE SOFTWARE.
commons-langcommons-lang
-
- io.jenkins.stapler
- jenkins-stapler-support
- jakarta.servlet.jsp.jstl
@@ -354,10 +341,6 @@ THE SOFTWARE.
org.kohsukewindows-package-checker
-
- org.kohsuke.jinterop
- j-interop
- org.kohsuke.metainf-servicesmetainf-services
diff --git a/core/src/main/java/hudson/ClassicPluginStrategy.java b/core/src/main/java/hudson/ClassicPluginStrategy.java
index 3d6edf832f9f..fd257fdb33d8 100644
--- a/core/src/main/java/hudson/ClassicPluginStrategy.java
+++ b/core/src/main/java/hudson/ClassicPluginStrategy.java
@@ -279,7 +279,7 @@ protected ClassLoader createClassLoader(List paths, ClassLoader parent) th
/**
* @deprecated since 2.459 use {@link #createClassLoader(String, List, ClassLoader, Attributes)}
*/
- @Deprecated(since="2.459")
+ @Deprecated(since = "2.459")
protected ClassLoader createClassLoader(List paths, ClassLoader parent, Attributes atts) throws IOException {
// generate a legacy id so at least we can track to something
return createClassLoader("unidentified-" + UUID.randomUUID(), paths, parent, atts);
diff --git a/core/src/main/java/hudson/Launcher.java b/core/src/main/java/hudson/Launcher.java
index 195671b1b42e..6e6bfc9dade3 100644
--- a/core/src/main/java/hudson/Launcher.java
+++ b/core/src/main/java/hudson/Launcher.java
@@ -1115,7 +1115,21 @@ public Proc launch(ProcStarter ps) throws IOException {
final String workDir = psPwd == null ? null : psPwd.getRemote();
try {
- RemoteLaunchCallable remote = new RemoteLaunchCallable(ps.commands, ps.masks, ps.envs, in, ps.reverseStdin, out, ps.reverseStdout, err, ps.reverseStderr, ps.quiet, workDir, listener, ps.stdoutListener, envVarsFilterRuleWrapper);
+ RemoteLaunchCallable remote = new RemoteLaunchCallable(
+ ps.commands,
+ ps.masks,
+ ps.envs,
+ in,
+ ps.reverseStdin,
+ out,
+ ps.reverseStdout,
+ err,
+ ps.reverseStderr,
+ ps.quiet,
+ workDir,
+ listener,
+ ps.stdoutListener,
+ envVarsFilterRuleWrapper);
// reset the rules to prevent build step without rules configuration to re-use those
envVarsFilterRuleWrapper = null;
return new ProcImpl(getChannel().call(remote));
diff --git a/core/src/main/java/hudson/lifecycle/WindowsInstallerLink.java b/core/src/main/java/hudson/lifecycle/WindowsInstallerLink.java
deleted file mode 100644
index af0ddf9a6ecf..000000000000
--- a/core/src/main/java/hudson/lifecycle/WindowsInstallerLink.java
+++ /dev/null
@@ -1,298 +0,0 @@
-/*
- * The MIT License
- *
- * Copyright (c) 2004-2009, Sun Microsystems, Inc., Kohsuke Kawaguchi, Seiji Sogabe, CloudBees, Inc.
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-
-package hudson.lifecycle;
-
-import edu.umd.cs.findbugs.annotations.NonNull;
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
-import hudson.AbortException;
-import hudson.Extension;
-import hudson.Functions;
-import hudson.Launcher.LocalLauncher;
-import hudson.Util;
-import hudson.model.ManagementLink;
-import hudson.model.TaskListener;
-import hudson.util.StreamTaskListener;
-import hudson.util.jna.DotNet;
-import jakarta.servlet.ServletException;
-import java.io.ByteArrayOutputStream;
-import java.io.File;
-import java.io.IOException;
-import java.net.URL;
-import java.nio.charset.Charset;
-import java.nio.file.Files;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-import jenkins.model.Jenkins;
-import jenkins.util.SystemProperties;
-import org.apache.commons.io.FileUtils;
-import org.apache.tools.ant.DefaultLogger;
-import org.apache.tools.ant.Project;
-import org.apache.tools.ant.taskdefs.Move;
-import org.apache.tools.ant.types.FileSet;
-import org.kohsuke.stapler.QueryParameter;
-import org.kohsuke.stapler.StaplerRequest2;
-import org.kohsuke.stapler.StaplerResponse2;
-import org.kohsuke.stapler.interceptor.RequirePOST;
-
-/**
- * {@link ManagementLink} that allows the installation as a Windows service.
- *
- * @author Kohsuke Kawaguchi
- */
-public class WindowsInstallerLink extends ManagementLink {
-
- /**
- * Location of the jenkins.war.
- * In general case, we can't determine this value, yet having this is a requirement for the installer.
- */
- private final File hudsonWar;
-
- /**
- * If the installation is completed, this value holds the installation directory.
- */
- private volatile File installationDir;
-
- private WindowsInstallerLink(File jenkinsWar) {
- this.hudsonWar = jenkinsWar;
- }
-
- @Override
- public String getIconFileName() {
- return "symbol-windows";
- }
-
- @Override
- public String getUrlName() {
- return "install";
- }
-
- @Override
- public String getDisplayName() {
- return Messages.WindowsInstallerLink_DisplayName();
- }
-
- @Override
- public String getDescription() {
- return Messages.WindowsInstallerLink_Description();
- }
-
-
- @NonNull
- @Override
- public Category getCategory() {
- return Category.CONFIGURATION;
- }
-
- /**
- * Is the installation successful?
- */
- public boolean isInstalled() {
- return installationDir != null;
- }
-
- /**
- * Performs installation.
- */
- @RequirePOST
- public void doDoInstall(StaplerRequest2 req, StaplerResponse2 rsp, @QueryParameter("dir") String _dir) throws IOException, ServletException {
- Jenkins.get().checkPermission(Jenkins.ADMINISTER);
-
- if (installationDir != null) {
- // installation already complete
- sendError("Installation is already complete", req, rsp);
- return;
- }
- if (!DotNet.isInstalled(4, 0)) {
- sendError(".NET Framework 4.0 or later is required for this feature", req, rsp);
- return;
- }
-
- final File dir = new File(_dir).getAbsoluteFile();
- if (!dir.exists()) {
- if (!dir.mkdirs()) {
- sendError("Failed to create installation directory: " + dir, req, rsp);
- return;
- }
- }
-
- try {
- // copy files over there
- copy(req, rsp, dir, getClass().getResource("/windows-service/jenkins.exe"), "jenkins.exe");
- Files.deleteIfExists(Util.fileToPath(dir).resolve("jenkins.exe.config"));
- copy(req, rsp, dir, getClass().getResource("/windows-service/jenkins.xml"), "jenkins.xml");
- if (!hudsonWar.getCanonicalFile().equals(new File(dir, "jenkins.war").getCanonicalFile()))
- copy(req, rsp, dir, hudsonWar.toURI().toURL(), "jenkins.war");
-
- // install as a service
- ByteArrayOutputStream baos = new ByteArrayOutputStream();
- StreamTaskListener task = new StreamTaskListener(baos);
- task.getLogger().println("Installing a service");
- int r = runElevated(new File(dir, "jenkins.exe"), "install", task, dir);
- if (r != 0) {
- sendError(baos.toString(Charset.defaultCharset()), req, rsp);
- return;
- }
-
- // installation was successful
- installationDir = dir;
- rsp.sendRedirect(".");
- } catch (AbortException e) {
- // this exception is used as a signal to terminate processing. the error should have been already reported
- } catch (InterruptedException e) {
- throw new ServletException(e);
- }
- }
-
- /**
- * Copies a single resource into the target folder, by the given name, and handle errors gracefully.
- */
- private void copy(StaplerRequest2 req, StaplerResponse2 rsp, File dir, URL src, String name) throws ServletException, IOException {
- try {
- FileUtils.copyURLToFile(src, new File(dir, name));
- } catch (IOException e) {
- LOGGER.log(Level.SEVERE, "Failed to copy " + name, e);
- sendError("Failed to copy " + name + ": " + e.getMessage(), req, rsp);
- throw new AbortException();
- }
- }
-
- @RequirePOST
- public void doRestart(StaplerRequest2 req, StaplerResponse2 rsp) throws IOException, ServletException {
- Jenkins.get().checkPermission(Jenkins.ADMINISTER);
-
- if (installationDir == null) {
- // if the user reloads the page after Hudson has restarted,
- // it comes back here. In such a case, don't let this restart Hudson.
- // so just send them back to the top page
- rsp.sendRedirect(req.getContextPath() + "/");
- return;
- }
-
- rsp.forward(this, "_restart", req);
- final File oldRoot = Jenkins.get().getRootDir();
-
- // initiate an orderly shutdown after we finished serving this request
- new Thread("terminator") {
- @SuppressFBWarnings(value = "DM_EXIT", justification = "Exit is really intended.")
- @Override
- public void run() {
- try {
- Thread.sleep(1000);
-
- // let the service start after we close our sockets, to avoid conflicts
- Runtime.getRuntime().addShutdownHook(new Thread("service starter") {
- @Override
- public void run() {
- try {
- if (!oldRoot.equals(installationDir)) {
- LOGGER.info("Moving data");
- Move mv = new Move();
- Project p = new Project();
- p.addBuildListener(createLogger());
- mv.setProject(p);
- FileSet fs = new FileSet();
- fs.setDir(oldRoot);
- fs.setExcludes("war/**"); // we can't really move the exploded war.
- mv.addFileset(fs);
- mv.setTodir(installationDir);
- mv.setFailOnError(false); // plugins can also fail to move
- mv.execute();
- }
- LOGGER.info("Starting a Windows service");
- StreamTaskListener task = StreamTaskListener.fromStdout();
- int r = runElevated(
- new File(installationDir, "jenkins.exe"), "start", task, installationDir);
- task.getLogger().println(r == 0 ? "Successfully started" : "start service failed. Exit code=" + r);
- } catch (IOException | InterruptedException e) {
- LOGGER.log(Level.WARNING, null, e);
- }
- }
-
- private DefaultLogger createLogger() {
- DefaultLogger logger = new DefaultLogger();
- logger.setOutputPrintStream(System.out);
- logger.setErrorPrintStream(System.err);
- return logger;
- }
- });
-
- Jenkins.get().cleanUp();
- System.exit(0);
- } catch (InterruptedException e) {
- LOGGER.log(Level.SEVERE, null, e);
- }
- }
- }.start();
- }
-
- /**
- * Displays the error in a page.
- */
- protected final void sendError(Exception e, StaplerRequest2 req, StaplerResponse2 rsp) throws ServletException, IOException {
- sendError(e.getMessage(), req, rsp);
- }
-
- protected final void sendError(String message, StaplerRequest2 req, StaplerResponse2 rsp) throws ServletException, IOException {
- req.setAttribute("message", message);
- req.setAttribute("pre", true);
- rsp.forward(Jenkins.get(), "error", req);
- }
-
- /**
- * Decide if {@link WindowsInstallerLink} should show up in UI, and if so, register it.
- */
- @Extension
- public static WindowsInstallerLink registerIfApplicable() {
- if (!Functions.isWindows())
- return null; // this is a Windows only feature
-
- if (Lifecycle.get() instanceof WindowsServiceLifecycle)
- return null; // already installed as Windows service
-
- // this system property is set by the launcher when we run "java -jar jenkins.war"
- // and this is how we know where is jenkins.war.
- String war = SystemProperties.getString("executable-war");
- if (war != null && new File(war).exists()) {
- WindowsInstallerLink link = new WindowsInstallerLink(new File(war));
-
- // TODO possibly now unused (JNLP installation mode is long gone):
- if (SystemProperties.getString(WindowsInstallerLink.class.getName() + ".prominent") != null)
- Jenkins.get().getActions().add(link);
-
- return link;
- }
-
- return null;
- }
-
- /**
- * Invokes jenkins.exe with a SCM management command.
- */
- static int runElevated(File jenkinsExe, String command, TaskListener out, File pwd) throws IOException, InterruptedException {
- return new LocalLauncher(out).launch().cmds(jenkinsExe, command).stdout(out).pwd(pwd).join();
- }
-
- private static final Logger LOGGER = Logger.getLogger(WindowsInstallerLink.class.getName());
-}
diff --git a/core/src/main/java/hudson/lifecycle/WindowsServiceLifecycle.java b/core/src/main/java/hudson/lifecycle/WindowsServiceLifecycle.java
index 2cf936679a68..b6595e21d940 100644
--- a/core/src/main/java/hudson/lifecycle/WindowsServiceLifecycle.java
+++ b/core/src/main/java/hudson/lifecycle/WindowsServiceLifecycle.java
@@ -49,7 +49,6 @@
* {@link Lifecycle} for Hudson installed as Windows service.
*
* @author Kohsuke Kawaguchi
- * @see WindowsInstallerLink
*/
public class WindowsServiceLifecycle extends Lifecycle {
public WindowsServiceLifecycle() {
diff --git a/core/src/main/java/hudson/model/ComputerSet.java b/core/src/main/java/hudson/model/ComputerSet.java
index fcc0aa4e41e7..cb8d19b78ad0 100644
--- a/core/src/main/java/hudson/model/ComputerSet.java
+++ b/core/src/main/java/hudson/model/ComputerSet.java
@@ -115,8 +115,8 @@ public static List get_monitors() {
}
/**
- * @deprecated Use {@link #getComputers()} instead.
* @return All {@link Computer} instances managed by this set.
+ * @deprecated Use {@link #getComputers()} instead.
*/
@Deprecated(since = "2.480")
public Computer[] get_all() {
diff --git a/core/src/main/java/hudson/model/Job.java b/core/src/main/java/hudson/model/Job.java
index 1bbf3dad1a24..2392c66aee5f 100644
--- a/core/src/main/java/hudson/model/Job.java
+++ b/core/src/main/java/hudson/model/Job.java
@@ -354,10 +354,12 @@ public interface BuildNumberAssigner extends ExtensionPoint {
* Implementation of {@link Job#assignBuildNumber}.
*/
int assignBuildNumber(Job, ?> job, SaveNextBuildNumber saveNextBuildNumber) throws IOException;
+
/**
* Provides an externally accessible alias for {@link Job#saveNextBuildNumber}, which is {@code protected}.
* ({@link #getNextBuildNumber} and {@link #fastUpdateNextBuildNumber} are already accessible.)
*/
+
interface SaveNextBuildNumber {
void call() throws IOException;
}
diff --git a/core/src/main/java/hudson/model/UserPropertyDescriptor.java b/core/src/main/java/hudson/model/UserPropertyDescriptor.java
index f19a54e14aa0..542f0a4ccde5 100644
--- a/core/src/main/java/hudson/model/UserPropertyDescriptor.java
+++ b/core/src/main/java/hudson/model/UserPropertyDescriptor.java
@@ -117,11 +117,9 @@ public boolean isEnabled() {
* Method proposed to prevent plugins to rely on too recent core version
* while keeping the possibility to use the categories.
*
- * @deprecated This should only be used when the core requirement is below the version this method was added
- *
* @return String name corresponding to the symbol of {@link #getUserPropertyCategory()}
- *
* @since 2.468
+ * @deprecated This should only be used when the core requirement is below the version this method was added
*/
@Deprecated
protected @CheckForNull String getUserPropertyCategoryAsString() {
diff --git a/core/src/main/java/hudson/model/userproperty/UserPropertyCategory.java b/core/src/main/java/hudson/model/userproperty/UserPropertyCategory.java
index 5d5467b6eed4..1d370e3e3b50 100644
--- a/core/src/main/java/hudson/model/userproperty/UserPropertyCategory.java
+++ b/core/src/main/java/hudson/model/userproperty/UserPropertyCategory.java
@@ -21,6 +21,7 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
+
package hudson.model.userproperty;
import edu.umd.cs.findbugs.annotations.NonNull;
diff --git a/core/src/main/java/hudson/model/userproperty/UserPropertyCategoryAccountAction.java b/core/src/main/java/hudson/model/userproperty/UserPropertyCategoryAccountAction.java
index c0424e828419..79c8a0e955ec 100644
--- a/core/src/main/java/hudson/model/userproperty/UserPropertyCategoryAccountAction.java
+++ b/core/src/main/java/hudson/model/userproperty/UserPropertyCategoryAccountAction.java
@@ -21,6 +21,7 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
+
package hudson.model.userproperty;
import edu.umd.cs.findbugs.annotations.NonNull;
diff --git a/core/src/main/java/hudson/model/userproperty/UserPropertyCategoryAppearanceAction.java b/core/src/main/java/hudson/model/userproperty/UserPropertyCategoryAppearanceAction.java
index 88d08a8add70..d4a5ebc2cedd 100644
--- a/core/src/main/java/hudson/model/userproperty/UserPropertyCategoryAppearanceAction.java
+++ b/core/src/main/java/hudson/model/userproperty/UserPropertyCategoryAppearanceAction.java
@@ -21,6 +21,7 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
+
package hudson.model.userproperty;
import edu.umd.cs.findbugs.annotations.NonNull;
diff --git a/core/src/main/java/hudson/model/userproperty/UserPropertyCategoryExperimentalAction.java b/core/src/main/java/hudson/model/userproperty/UserPropertyCategoryExperimentalAction.java
index bb242bacad7a..93d6593fc605 100644
--- a/core/src/main/java/hudson/model/userproperty/UserPropertyCategoryExperimentalAction.java
+++ b/core/src/main/java/hudson/model/userproperty/UserPropertyCategoryExperimentalAction.java
@@ -21,6 +21,7 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
+
package hudson.model.userproperty;
import edu.umd.cs.findbugs.annotations.NonNull;
diff --git a/core/src/main/java/hudson/model/userproperty/UserPropertyCategoryPreferencesAction.java b/core/src/main/java/hudson/model/userproperty/UserPropertyCategoryPreferencesAction.java
index 7a74b702e6c0..83e14ce9b333 100644
--- a/core/src/main/java/hudson/model/userproperty/UserPropertyCategoryPreferencesAction.java
+++ b/core/src/main/java/hudson/model/userproperty/UserPropertyCategoryPreferencesAction.java
@@ -21,6 +21,7 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
+
package hudson.model.userproperty;
import edu.umd.cs.findbugs.annotations.NonNull;
diff --git a/core/src/main/java/hudson/model/userproperty/UserPropertyCategorySecurityAction.java b/core/src/main/java/hudson/model/userproperty/UserPropertyCategorySecurityAction.java
index a6cb3e6ed3c4..03513b37aa63 100644
--- a/core/src/main/java/hudson/model/userproperty/UserPropertyCategorySecurityAction.java
+++ b/core/src/main/java/hudson/model/userproperty/UserPropertyCategorySecurityAction.java
@@ -21,8 +21,8 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
-package hudson.model.userproperty;
+package hudson.model.userproperty;
import edu.umd.cs.findbugs.annotations.NonNull;
import hudson.Extension;
diff --git a/core/src/main/java/hudson/os/SU.java b/core/src/main/java/hudson/os/SU.java
deleted file mode 100644
index d98520ab5ae1..000000000000
--- a/core/src/main/java/hudson/os/SU.java
+++ /dev/null
@@ -1,180 +0,0 @@
-/*
- * The MIT License
- *
- * Copyright (c) 2004-2009, Sun Microsystems, Inc., Kohsuke Kawaguchi
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-
-package hudson.os;
-
-import static hudson.util.jna.GNUCLibrary.LIBC;
-
-import com.sun.solaris.EmbeddedSu;
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
-import hudson.FilePath;
-import hudson.Launcher.LocalLauncher;
-import hudson.Util;
-import hudson.model.Computer;
-import hudson.model.TaskListener;
-import hudson.remoting.Callable;
-import hudson.remoting.Launcher;
-import hudson.remoting.LocalChannel;
-import hudson.remoting.VirtualChannel;
-import hudson.remoting.Which;
-import hudson.slaves.Channels;
-import hudson.util.ArgumentListBuilder;
-import java.io.File;
-import java.io.IOException;
-import java.io.PrintStream;
-import java.nio.charset.Charset;
-import java.util.Collections;
-
-/**
- * Executes {@link Callable} as the super user, by forking a new process and executing the closure in there
- * if necessary.
- *
- *
- * A best effort is made to execute the closure as root, but we may still end up executing the closure
- * in the non-root privilege, so the closure should expect that and handle it gracefully.
- *
- *
- * Still very much experimental. Subject to change. Don't use it.
- *
- * @author Kohsuke Kawaguchi
- */
-public abstract class SU {
- private SU() { // not meant to be instantiated
- }
-
- /**
- * Returns a {@link VirtualChannel} that's connected to the privilege-escalated environment.
- *
- * @param listener
- * What this method is doing (such as what process it's invoking) will be sent here.
- * @return
- * Never null. This may represent a channel to a separate JVM, or just {@link LocalChannel}.
- * Close this channel and the SU environment will be shut down.
- */
- public static VirtualChannel start(final TaskListener listener, final String rootUsername, final String rootPassword) throws IOException, InterruptedException {
- if (File.pathSeparatorChar == ';') // on Windows
- return newLocalChannel(); // TODO: perhaps use RunAs to run as an Administrator?
-
- String os = Util.fixNull(System.getProperty("os.name"));
- if (os.equals("Linux"))
- return new UnixSu() {
- @Override
- protected String sudoExe() {
- return "sudo";
- }
-
- @SuppressFBWarnings(value = "COMMAND_INJECTION", justification = "TODO needs triage")
- @Override
- protected Process sudoWithPass(ArgumentListBuilder args) throws IOException {
- args.prepend(sudoExe(), "-S");
- listener.getLogger().println("$ " + String.join(" ", args.toList()));
- ProcessBuilder pb = new ProcessBuilder(args.toCommandArray());
- Process p = pb.start();
- // TODO: use -p to detect prompt
- // TODO: detect if the password didn't work
- try (PrintStream ps = new PrintStream(p.getOutputStream(), false, Charset.defaultCharset())) {
- ps.println(rootPassword);
- ps.println(rootPassword);
- ps.println(rootPassword);
- }
- return p;
- }
- }.start(listener, rootPassword);
-
- if (os.equals("SunOS"))
- return new UnixSu() {
- @Override
- protected String sudoExe() {
- return "/usr/bin/pfexec";
- }
-
- @SuppressFBWarnings(value = "COMMAND_INJECTION", justification = "TODO needs triage")
- @Override
- protected Process sudoWithPass(ArgumentListBuilder args) throws IOException {
- listener.getLogger().println("Running with embedded_su");
- ProcessBuilder pb = new ProcessBuilder(args.prepend(sudoExe()).toCommandArray());
- return EmbeddedSu.startWithSu(rootUsername, rootPassword, pb);
- }
- // in solaris, pfexec never asks for a password, so username==null means
- // we won't be using password. this helps disambiguate empty password
- }.start(listener, rootUsername == null ? null : rootPassword);
-
- // TODO: Mac?
-
- // unsupported platform, take a chance
- return newLocalChannel();
- }
-
- private static LocalChannel newLocalChannel() {
- return FilePath.localChannel;
- }
-
- /**
- * Starts a new privilege-escalated environment, execute a closure, and shut it down.
- */
- public static V execute(TaskListener listener, String rootUsername, String rootPassword, final Callable closure) throws T, IOException, InterruptedException {
- VirtualChannel ch = start(listener, rootUsername, rootPassword);
- try {
- return ch.call(closure);
- } finally {
- ch.close();
- ch.join(3000); // give some time for orderly shutdown, but don't block forever.
- }
- }
-
- private abstract static class UnixSu {
-
- protected abstract String sudoExe();
-
- protected abstract Process sudoWithPass(ArgumentListBuilder args) throws IOException;
-
- VirtualChannel start(TaskListener listener, String rootPassword) throws IOException, InterruptedException {
- final int uid = LIBC.geteuid();
-
- if (uid == 0) // already running as root
- return newLocalChannel();
-
- String javaExe = System.getProperty("java.home") + "/bin/java";
- File agentJar = Which.jarFile(Launcher.class);
-
- ArgumentListBuilder args = new ArgumentListBuilder().add(javaExe);
- if (agentJar.isFile())
- args.add("-jar").add(agentJar);
- else // in production code this never happens, but during debugging this is convenient
- args.add("-cp").add(agentJar).add(hudson.remoting.Launcher.class.getName());
-
- if (Util.fixEmptyAndTrim(rootPassword) == null) {
- // try sudo, in the hope that the user has the permission to do so without password
- return new LocalLauncher(listener).launchChannel(
- args.prepend(sudoExe()).toCommandArray(),
- listener.getLogger(), null, Collections.emptyMap());
- } else {
- // try sudo with the given password. Also run in pfexec so that we can elevate the privileges
- Process proc = sudoWithPass(args);
- return Channels.forProcess(args.toStringWithQuote(), Computer.threadPoolForRemoting, proc,
- listener.getLogger());
- }
- }
- }
-}
diff --git a/core/src/main/java/hudson/util/RobustReflectionConverter.java b/core/src/main/java/hudson/util/RobustReflectionConverter.java
index 686aad13c342..5267692252b9 100644
--- a/core/src/main/java/hudson/util/RobustReflectionConverter.java
+++ b/core/src/main/java/hudson/util/RobustReflectionConverter.java
@@ -464,7 +464,14 @@ protected Object unmarshalField(final UnmarshallingContext context, final Object
return context.convertAnother(result, type, converter);
}
- private void writeValueToImplicitCollection(HierarchicalStreamReader reader, UnmarshallingContext context, Object value, Map> implicitCollections, Map> implicitCollectionElementTypes, Object result, String itemFieldName) {
+ private void writeValueToImplicitCollection(
+ HierarchicalStreamReader reader,
+ UnmarshallingContext context,
+ Object value,
+ Map> implicitCollections,
+ Map> implicitCollectionElementTypes,
+ Object result,
+ String itemFieldName) {
String fieldName = mapper.getFieldNameForItemTypeAndName(context.getRequiredType(), value.getClass(), itemFieldName);
if (fieldName != null) {
Collection collection = implicitCollections.get(fieldName);
diff --git a/core/src/main/java/hudson/util/jna/DotNet.java b/core/src/main/java/hudson/util/jna/DotNet.java
deleted file mode 100644
index 6b3146a82219..000000000000
--- a/core/src/main/java/hudson/util/jna/DotNet.java
+++ /dev/null
@@ -1,219 +0,0 @@
-/*
- * The MIT License
- *
- * Copyright (c) 2004-2009, Sun Microsystems, Inc., Kohsuke Kawaguchi
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- * THE SOFTWARE.
- */
-
-package hudson.util.jna;
-
-import java.net.UnknownHostException;
-import org.jinterop.dcom.common.IJIAuthInfo;
-import org.jinterop.dcom.common.JIException;
-import org.jinterop.winreg.IJIWinReg;
-import org.jinterop.winreg.JIPolicyHandle;
-import org.jinterop.winreg.JIWinRegFactory;
-
-/**
- * .NET related code.
- *
- * @author Kohsuke Kawaguchi
- */
-public class DotNet {
- private static final String PATH20 = "SOFTWARE\\Microsoft\\NET Framework Setup\\NDP\\v2.0.50727";
- private static final String PATH30 = "SOFTWARE\\Microsoft\\NET Framework Setup\\NDP\\v3.0\\Setup";
- private static final String PATH35 = "SOFTWARE\\Microsoft\\NET Framework Setup\\NDP\\v3.5";
- private static final String PATH4 = "SOFTWARE\\Microsoft\\NET Framework Setup\\NDP\\v4\\Full";
-
- private static final String VALUE_INSTALL = "Install";
- private static final String VALUE_INSTALL_SUCCESS = "InstallSuccess";
- private static final String VALUE_RELEASE = "Release";
-
- /**
- * Returns true if the .NET framework of a compatible version is installed.
- */
- public static boolean isInstalled(int major, int minor) {
- try {
- if (major == 4 && minor >= 5) {
- return isV45PlusInstalled(minor);
- } else if (major == 4 && minor == 0) {
- return isV40Installed();
- } else if (major == 3 && minor == 5) {
- return isV35Installed();
- } else if (major == 3 && minor == 0) {
- return isV35Installed() || isV30Installed();
- } else if (major == 2 && minor == 0) {
- return isV35Installed() || isV30Installed() || isV20Installed();
- } else {
- return false;
- }
- } catch (JnaException e) {
- if (e.getErrorCode() == 2) {
- // thrown when openReadonly fails because the key doesn't exist.
- return false;
- }
- throw e;
- }
- }
-
- private static boolean isV45PlusInstalled(int minor) {
- try (RegistryKey key = RegistryKey.LOCAL_MACHINE.openReadonly(PATH4)) {
- return key.getIntValue(VALUE_RELEASE) >= GetV45PlusMinRelease(minor);
- }
- }
-
- private static boolean isV40Installed() {
- try (RegistryKey key = RegistryKey.LOCAL_MACHINE.openReadonly(PATH4)) {
- return key.getIntValue(VALUE_INSTALL) == 1;
- }
- }
-
- private static boolean isV35Installed() {
- try (RegistryKey key = RegistryKey.LOCAL_MACHINE.openReadonly(PATH35)) {
- return key.getIntValue(VALUE_INSTALL) == 1;
- }
- }
-
- private static boolean isV30Installed() {
- try (RegistryKey key = RegistryKey.LOCAL_MACHINE.openReadonly(PATH30)) {
- return key.getIntValue(VALUE_INSTALL_SUCCESS) == 1;
- }
- }
-
- private static boolean isV20Installed() {
- try (RegistryKey key = RegistryKey.LOCAL_MACHINE.openReadonly(PATH20)) {
- return key.getIntValue(VALUE_INSTALL) == 1;
- }
- }
-
- /**
- * Returns true if the .NET framework of a compatible version is installed on a remote machine.
- */
- public static boolean isInstalled(int major, int minor, String targetMachine, IJIAuthInfo session) throws JIException, UnknownHostException {
- IJIWinReg registry = JIWinRegFactory.getSingleTon().getWinreg(session, targetMachine, true);
- JIPolicyHandle hklm = null;
- try {
- hklm = registry.winreg_OpenHKLM();
- if (major == 4 && minor >= 5) {
- return isV45PlusInstalled(minor, registry, hklm);
- } else if (major == 4 && minor == 0) {
- return isV40Installed(registry, hklm);
- } else if (major == 3 && minor == 5) {
- return isV35Installed(registry, hklm);
- } else if (major == 3 && minor == 0) {
- return isV35Installed(registry, hklm) || isV30Installed(registry, hklm);
- } else if (major == 2 && minor == 0) {
- return isV35Installed(registry, hklm) || isV30Installed(registry, hklm) || isV20Installed(registry, hklm);
- } else {
- return false;
- }
- } catch (JIException e) {
- if (e.getErrorCode() == 2) {
- // not found
- return false;
- }
- throw e;
- } finally {
- if (hklm != null) {
- registry.winreg_CloseKey(hklm);
- }
- registry.closeConnection();
- }
- }
-
- private static boolean isV45PlusInstalled(int minor, IJIWinReg registry, JIPolicyHandle hklm) throws JIException {
- JIPolicyHandle key = null;
- try {
- key = registry.winreg_OpenKey(hklm, PATH4, IJIWinReg.KEY_READ);
- return GetIntValue(registry, key, VALUE_RELEASE) >= GetV45PlusMinRelease(minor);
- } finally {
- if (key != null) {
- registry.winreg_CloseKey(key);
- }
- }
- }
-
- private static boolean isV40Installed(IJIWinReg registry, JIPolicyHandle hklm) throws JIException {
- JIPolicyHandle key = null;
- try {
- key = registry.winreg_OpenKey(hklm, PATH4, IJIWinReg.KEY_READ);
- return GetIntValue(registry, key, VALUE_INSTALL) == 1;
- } finally {
- if (key != null) {
- registry.winreg_CloseKey(key);
- }
- }
- }
-
- private static boolean isV35Installed(IJIWinReg registry, JIPolicyHandle hklm) throws JIException {
- JIPolicyHandle key = null;
- try {
- key = registry.winreg_OpenKey(hklm, PATH35, IJIWinReg.KEY_READ);
- return GetIntValue(registry, key, VALUE_INSTALL) == 1;
- } finally {
- if (key != null) {
- registry.winreg_CloseKey(key);
- }
- }
- }
-
- private static boolean isV30Installed(IJIWinReg registry, JIPolicyHandle hklm) throws JIException {
- JIPolicyHandle key = null;
- try {
- key = registry.winreg_OpenKey(hklm, PATH30, IJIWinReg.KEY_READ);
- return GetIntValue(registry, key, VALUE_INSTALL_SUCCESS) == 1;
- } finally {
- if (key != null) {
- registry.winreg_CloseKey(key);
- }
- }
- }
-
- private static boolean isV20Installed(IJIWinReg registry, JIPolicyHandle hklm) throws JIException {
- JIPolicyHandle key = null;
- try {
- key = registry.winreg_OpenKey(hklm, PATH20, IJIWinReg.KEY_READ);
- return GetIntValue(registry, key, VALUE_INSTALL) == 1;
- } finally {
- if (key != null) {
- registry.winreg_CloseKey(key);
- }
- }
- }
-
- private static int GetIntValue(IJIWinReg registry, JIPolicyHandle key, String name) throws JIException {
- return RegistryKey.convertBufferToInt((byte[]) registry.winreg_QueryValue(key, name, Integer.BYTES)[1]);
- }
-
- private static int GetV45PlusMinRelease(int minor) {
- switch (minor) {
- case 5:
- return 378389;
- case 6:
- return 393295;
- case 7:
- return 460798;
- case 8:
- return 528040;
- default:
- return Integer.MAX_VALUE;
- }
- }
-}
diff --git a/core/src/main/java/jenkins/agents/IOfflineCause.java b/core/src/main/java/jenkins/agents/IOfflineCause.java
index b1c32820e848..ffc8dfdfd8cc 100644
--- a/core/src/main/java/jenkins/agents/IOfflineCause.java
+++ b/core/src/main/java/jenkins/agents/IOfflineCause.java
@@ -21,6 +21,7 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
+
package jenkins.agents;
import edu.umd.cs.findbugs.annotations.NonNull;
diff --git a/core/src/main/java/jenkins/model/IComputer.java b/core/src/main/java/jenkins/model/IComputer.java
index e00ee78bd30f..ad4c5aa8ca8b 100644
--- a/core/src/main/java/jenkins/model/IComputer.java
+++ b/core/src/main/java/jenkins/model/IComputer.java
@@ -185,6 +185,7 @@ default String getIconClassName() {
* Returns the number of {@link IExecutor}s that are doing some work right now.
*/
int countBusy();
+
/**
* Returns the current size of the executor pool for this computer.
*/
@@ -194,6 +195,7 @@ default String getIconClassName() {
* @return true if the computer is online.
*/
boolean isOnline();
+
/**
* @return the number of {@link IExecutor}s that are idle right now.
*/
diff --git a/core/src/main/java/jenkins/model/Jenkins.java b/core/src/main/java/jenkins/model/Jenkins.java
index 66adc45f82e8..802681c939f2 100644
--- a/core/src/main/java/jenkins/model/Jenkins.java
+++ b/core/src/main/java/jenkins/model/Jenkins.java
@@ -5814,7 +5814,6 @@ public boolean shouldShowStackTrace() {
*
* @since 2.222
*/
- @Restricted(Beta.class)
public static final Permission MANAGE = new Permission(PERMISSIONS, "Manage",
Messages._Jenkins_Manage_Description(),
ADMINISTER,
diff --git a/core/src/main/java/jenkins/model/Nodes.java b/core/src/main/java/jenkins/model/Nodes.java
index ae78028c2d2f..e4cf934fd7a5 100644
--- a/core/src/main/java/jenkins/model/Nodes.java
+++ b/core/src/main/java/jenkins/model/Nodes.java
@@ -113,7 +113,7 @@ public List getNodes() {
* @throws IOException if the new list of nodes could not be persisted.
*/
public void setNodes(final @NonNull Collection extends Node> nodes) throws IOException {
- Map toRemove = new HashMap<>();
+ Map toRemove = new HashMap<>();
Queue.withLock(() -> {
toRemove.putAll(Nodes.this.nodes);
for (var node : nodes) {
diff --git a/core/src/main/java/jenkins/security/s2m/JarURLValidatorImpl.java b/core/src/main/java/jenkins/security/s2m/JarURLValidatorImpl.java
index 7fafcea946d5..24a7dc64a67c 100644
--- a/core/src/main/java/jenkins/security/s2m/JarURLValidatorImpl.java
+++ b/core/src/main/java/jenkins/security/s2m/JarURLValidatorImpl.java
@@ -78,6 +78,7 @@ public void validate(URL url) throws IOException {
LOGGER.log(Level.FINE, () -> "Allowing URL: " + url);
}
}
+
@SuppressFBWarnings(
value = "DMI_COLLECTION_OF_URLS",
justification = "All URLs point to local files, so no DNS lookup.")
diff --git a/core/src/main/java/jenkins/security/stapler/StaplerAccessibleType.java b/core/src/main/java/jenkins/security/stapler/StaplerAccessibleType.java
new file mode 100644
index 000000000000..5f2074397999
--- /dev/null
+++ b/core/src/main/java/jenkins/security/stapler/StaplerAccessibleType.java
@@ -0,0 +1,39 @@
+/*
+ * The MIT License
+ *
+ * Copyright (c) 2018, CloudBees, Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+
+package jenkins.security.stapler;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * Explicitly tell Jenkins the annotated type is to be accessible by Stapler, i.e. getters and fields with this (return) type can be invoked.
+ */
+@Target(ElementType.TYPE)
+@Retention(RetentionPolicy.RUNTIME)
+@Documented
+public @interface StaplerAccessibleType {}
diff --git a/core/src/main/java/jenkins/security/stapler/StaplerDispatchable.java b/core/src/main/java/jenkins/security/stapler/StaplerDispatchable.java
new file mode 100644
index 000000000000..aa0953a80b9e
--- /dev/null
+++ b/core/src/main/java/jenkins/security/stapler/StaplerDispatchable.java
@@ -0,0 +1,39 @@
+/*
+ * The MIT License
+ *
+ * Copyright (c) 2018, CloudBees, Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+
+package jenkins.security.stapler;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * Explicitly tell Jenkins the annotated element is to be dispatched by Stapler, if possible.
+ */
+@Target({ElementType.FIELD, ElementType.METHOD})
+@Retention(RetentionPolicy.RUNTIME)
+@Documented
+public @interface StaplerDispatchable {}
diff --git a/core/src/main/java/jenkins/security/stapler/StaplerFragments.java b/core/src/main/java/jenkins/security/stapler/StaplerFragments.java
new file mode 100644
index 000000000000..2fafe442a709
--- /dev/null
+++ b/core/src/main/java/jenkins/security/stapler/StaplerFragments.java
@@ -0,0 +1,43 @@
+/*
+ * The MIT License
+ *
+ * Copyright (c) 2019 CloudBees, Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+
+package jenkins.security.stapler;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * Lists the view names that should be considered fragments and should not be directly dispatched.
+ *
+ * @since 1.1
+ */
+@Target(ElementType.TYPE)
+@Retention(RetentionPolicy.RUNTIME)
+@Documented
+public @interface StaplerFragments {
+ String[] value() default {};
+}
diff --git a/core/src/main/java/jenkins/security/stapler/StaplerNotDispatchable.java b/core/src/main/java/jenkins/security/stapler/StaplerNotDispatchable.java
new file mode 100644
index 000000000000..dac4af5008bd
--- /dev/null
+++ b/core/src/main/java/jenkins/security/stapler/StaplerNotDispatchable.java
@@ -0,0 +1,39 @@
+/*
+ * The MIT License
+ *
+ * Copyright (c) 2018, CloudBees, Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+
+package jenkins.security.stapler;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * Explicitly tell Jenkins the annotated element is not to be dispatched by Stapler.
+ */
+@Target({ElementType.FIELD, ElementType.METHOD})
+@Retention(RetentionPolicy.RUNTIME)
+@Documented
+public @interface StaplerNotDispatchable {}
diff --git a/core/src/main/java/jenkins/security/stapler/StaplerViews.java b/core/src/main/java/jenkins/security/stapler/StaplerViews.java
new file mode 100644
index 000000000000..b16905b73418
--- /dev/null
+++ b/core/src/main/java/jenkins/security/stapler/StaplerViews.java
@@ -0,0 +1,43 @@
+/*
+ * The MIT License
+ *
+ * Copyright (c) 2019 CloudBees, Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+
+package jenkins.security.stapler;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * Lists the dispatchable views of a class.
+ *
+ * @since 1.1
+ */
+@Target(ElementType.TYPE)
+@Retention(RetentionPolicy.RUNTIME)
+@Documented
+public @interface StaplerViews {
+ String[] value() default {};
+}
diff --git a/core/src/main/resources/hudson/lifecycle/Messages.properties b/core/src/main/resources/hudson/lifecycle/Messages.properties
index 3aa7c2b3135a..01d65187ced9 100644
--- a/core/src/main/resources/hudson/lifecycle/Messages.properties
+++ b/core/src/main/resources/hudson/lifecycle/Messages.properties
@@ -20,8 +20,6 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
-WindowsInstallerLink.DisplayName=Install as Windows Service
-WindowsInstallerLink.Description=Installs Jenkins as a Windows service to this system, so that Jenkins starts automatically when the machine boots.
WindowsSlaveInstaller.ConfirmInstallation=This will install an agent as a Windows service, so that a Jenkins agent starts automatically when the machine boots.
WindowsSlaveInstaller.DotNetRequired=.NET Framework 4.0 or later is required for this feature
WindowsSlaveInstaller.InstallationSuccessful=Installation was successful. Would you like to start the service now?
diff --git a/core/src/main/resources/hudson/lifecycle/Messages_bg.properties b/core/src/main/resources/hudson/lifecycle/Messages_bg.properties
index 2cde0c98caaf..626f75a68475 100644
--- a/core/src/main/resources/hudson/lifecycle/Messages_bg.properties
+++ b/core/src/main/resources/hudson/lifecycle/Messages_bg.properties
@@ -20,11 +20,6 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
-WindowsInstallerLink.DisplayName=\
- Инсталиране като услуга на Windows
-WindowsInstallerLink.Description=\
- Инсталиране на Jenkins като услуга на инсталирания на тази система Windows, за\
- да може той да се стартира заедно с машината.
WindowsSlaveInstaller.DotNetRequired=\
За това се изисква .NET Framework, версия 4.0 или по-висока
WindowsSlaveInstaller.InstallationSuccessful=\
diff --git a/core/src/main/resources/hudson/lifecycle/Messages_da.properties b/core/src/main/resources/hudson/lifecycle/Messages_da.properties
index d4d3a4a4b1b9..ffc29e9907dc 100644
--- a/core/src/main/resources/hudson/lifecycle/Messages_da.properties
+++ b/core/src/main/resources/hudson/lifecycle/Messages_da.properties
@@ -20,7 +20,5 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
-WindowsInstallerLink.DisplayName=Installer som Windows service
WindowsSlaveInstaller.DotNetRequired=Denne feature kræver .NET framework 4.0 eller nyere
WindowsSlaveInstaller.InstallationSuccessful=Installationen lykkedes. Vil du gerne starte service''en nu ?
-WindowsInstallerLink.Description=Installerer Jenkins som en Windows service på denne computer, så Jenkins starter automatisk når computeren starter op.
diff --git a/core/src/main/resources/hudson/lifecycle/Messages_de.properties b/core/src/main/resources/hudson/lifecycle/Messages_de.properties
index b134997c4299..d19710ba4ff8 100644
--- a/core/src/main/resources/hudson/lifecycle/Messages_de.properties
+++ b/core/src/main/resources/hudson/lifecycle/Messages_de.properties
@@ -20,10 +20,6 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
-WindowsInstallerLink.DisplayName=Als Windows-Dienst installieren
-WindowsInstallerLink.Description=\
- Installiert Jenkins als Windows-Dienst: Dadurch wird Jenkins \
- automatisch nach einem Neustart des Rechners gestartet.
WindowsSlaveInstaller.DotNetRequired=.NET Framework 4.0 oder höher ist für diesen Vorgang erforderlich.
WindowsSlaveInstaller.InstallationSuccessful=Installation erfolgreich. Möchten Sie den Dienst jetzt starten?
WindowsSlaveInstaller.ConfirmInstallation=Dies wird den Agenten als Windows-Dienst installieren, so dass er automatisch gestartet wird, wenn das System startet.
diff --git a/core/src/main/resources/hudson/lifecycle/Messages_es.properties b/core/src/main/resources/hudson/lifecycle/Messages_es.properties
index 2e119d1b6eca..6f07417f2ee9 100644
--- a/core/src/main/resources/hudson/lifecycle/Messages_es.properties
+++ b/core/src/main/resources/hudson/lifecycle/Messages_es.properties
@@ -20,8 +20,6 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
-WindowsInstallerLink.DisplayName=Instalar como un servicio de Windows
-WindowsInstallerLink.Description=Instalar Jenkins como un servicio de Windows en este sistema, de manera que Jenkins se inicie cuando el sistema arranque.
WindowsSlaveInstaller.ConfirmInstallation=Esto instalará el agente como un servicio de Windows.
WindowsSlaveInstaller.DotNetRequired=Es necesario tener instalado: .NET Framework 4.0 o posterior, para que esta característica funcione.
WindowsSlaveInstaller.InstallationSuccessful=La instalación ha sido correcta. ¿Quieres arrancar el servicio ahora?
diff --git a/core/src/main/resources/hudson/lifecycle/Messages_fr.properties b/core/src/main/resources/hudson/lifecycle/Messages_fr.properties
deleted file mode 100644
index e76abc01cf83..000000000000
--- a/core/src/main/resources/hudson/lifecycle/Messages_fr.properties
+++ /dev/null
@@ -1,24 +0,0 @@
-# The MIT License
-#
-# Copyright (c) 2004-2009, Sun Microsystems, Inc., Kohsuke Kawaguchi, Eric Lefevre-Ardant, Olivier Lamy
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-
-WindowsInstallerLink.DisplayName=Installer en tant que Service Windows
-WindowsInstallerLink.Description=Installe Jenkins comme un service Windows pour ce système, afin que Jenkins puisse se lancer automatiquement au démarrage de la machine.
diff --git a/core/src/main/resources/hudson/lifecycle/Messages_it.properties b/core/src/main/resources/hudson/lifecycle/Messages_it.properties
index 6b8cc4f8a28f..a20015b5c08d 100644
--- a/core/src/main/resources/hudson/lifecycle/Messages_it.properties
+++ b/core/src/main/resources/hudson/lifecycle/Messages_it.properties
@@ -21,10 +21,6 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
-WindowsInstallerLink.Description=Installa Jenkins su questo sistema come \
- servizio Windows in modo che possa avviarsi automaticamente all''avvio del \
- sistema.
-WindowsInstallerLink.DisplayName=Installa come servizio Windows
WindowsSlaveInstaller.ConfirmInstallation=Quest''opzione installerà un agente \
come servizio Windows in modo da far avviare automaticamente un agente \
Jenkins all''avvio del sistema.
diff --git a/core/src/main/resources/hudson/lifecycle/Messages_ja.properties b/core/src/main/resources/hudson/lifecycle/Messages_ja.properties
index 99da1c9e37ef..40fcce0b2dee 100644
--- a/core/src/main/resources/hudson/lifecycle/Messages_ja.properties
+++ b/core/src/main/resources/hudson/lifecycle/Messages_ja.properties
@@ -20,8 +20,6 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
-WindowsInstallerLink.DisplayName=Windowsのサービスとしてインストール
-WindowsInstallerLink.Description=マシンがブートしたときにJenkinsが自動的に開始するように、WindowsのサービスとしてJenkinsをインストールします。
WindowsSlaveInstaller.DotNetRequired=.NET Framework 4.0 以降が必要です。
WindowsSlaveInstaller.InstallationSuccessful=インストールが成功しました。今すぐサービスを開始しますか?
WindowsSlaveInstaller.RootFsDoesntExist=エージェントのルートディレクトリ ''{0}'' が存在しません。
diff --git a/core/src/main/resources/hudson/lifecycle/Messages_nl.properties b/core/src/main/resources/hudson/lifecycle/Messages_nl.properties
deleted file mode 100644
index beb2f7f1128f..000000000000
--- a/core/src/main/resources/hudson/lifecycle/Messages_nl.properties
+++ /dev/null
@@ -1,23 +0,0 @@
-# The MIT License
-#
-# Copyright (c) 2004-2009, Sun Microsystems, Inc., Kohsuke Kawaguchi, Wim Rosseel
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to deal
-# in the Software without restriction, including without limitation the rights
-# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-# copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-# THE SOFTWARE.
-WindowsInstallerLink.DisplayName=Installeer als Windows Service
-WindowsInstallerLink.Description=Installeert Jenkins als een Windows service op dit systeem. Zodoende wordt Jenkins automatisch opgestart bij het opstarten van uw systeem.
diff --git a/core/src/main/resources/hudson/lifecycle/Messages_pl.properties b/core/src/main/resources/hudson/lifecycle/Messages_pl.properties
index 51a964e099f3..39a6b5a34369 100644
--- a/core/src/main/resources/hudson/lifecycle/Messages_pl.properties
+++ b/core/src/main/resources/hudson/lifecycle/Messages_pl.properties
@@ -19,7 +19,5 @@
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
-WindowsInstallerLink.DisplayName=Zainstaluj jako usługę systemową
WindowsSlaveInstaller.DotNetRequired=.NET Framework 4.0 lub nowszy jest wymagany dla tej funkcjonalności
WindowsSlaveInstaller.InstallationSuccessful=Instalacja zakończona pomyślnie. Chcesz uruchomić usługę teraz?
-WindowsInstallerLink.Description=Zainstaluj Jenkinsa jako usługę systemową, aby uruchomić Jenkinsa automatycznie po uruchomieniu systemu.
diff --git a/core/src/main/resources/hudson/lifecycle/Messages_pt_BR.properties b/core/src/main/resources/hudson/lifecycle/Messages_pt_BR.properties
index f499828207b3..982bd72e7587 100644
--- a/core/src/main/resources/hudson/lifecycle/Messages_pt_BR.properties
+++ b/core/src/main/resources/hudson/lifecycle/Messages_pt_BR.properties
@@ -20,9 +20,7 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
-WindowsInstallerLink.DisplayName=Instalar como um serviço do Windows
WindowsSlaveInstaller.DotNetRequired=Framework .NET 4.0 ou superior é necessário
WindowsSlaveInstaller.InstallationSuccessful=Instalação efetuada com sucesso. Gostaria de iniciar o serviço agora?
-WindowsInstallerLink.Description=Instala o Jenkins como um serviço do Windows, então será iniciado junto com o sistema operacional
WindowsSlaveInstaller.RootFsDoesntExist=O diretório raiz do agente '{0}' não existe
WindowsSlaveInstaller.ConfirmInstallation=Isto irá instalar o agente como um serviço do Windows de forma que o agente do Jenkins iniciará automaticamente quando a máquina iniciar.
diff --git a/core/src/main/resources/hudson/lifecycle/Messages_sr.properties b/core/src/main/resources/hudson/lifecycle/Messages_sr.properties
index e700411d9bf7..d4ed51a5a825 100644
--- a/core/src/main/resources/hudson/lifecycle/Messages_sr.properties
+++ b/core/src/main/resources/hudson/lifecycle/Messages_sr.properties
@@ -1,7 +1,5 @@
# This file is under the MIT License by authors
-WindowsInstallerLink.DisplayName=Инсталирај као Windows сервис
-WindowsInstallerLink.Description=Инсталира Jenkins као Windows сервис који се аутоматско покрене када почне машина.
WindowsSlaveInstaller.ConfirmInstallation=Операција ће инсталирати агент који се аутоматско покрене када почне машина.
WindowsSlaveInstaller.InstallationSuccessful=Успешна инсталација. Да се желите да сада покренете сервис?
WindowsSlaveInstaller.DotNetRequired=За то није потребно .NET Framework 4.0 или новије
diff --git a/core/src/main/resources/hudson/lifecycle/Messages_sv_SE.properties b/core/src/main/resources/hudson/lifecycle/Messages_sv_SE.properties
index f04981c4f0d3..ba10c1597612 100644
--- a/core/src/main/resources/hudson/lifecycle/Messages_sv_SE.properties
+++ b/core/src/main/resources/hudson/lifecycle/Messages_sv_SE.properties
@@ -20,8 +20,6 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
-WindowsInstallerLink.DisplayName=Installera som Windows-tjänst
-WindowsInstallerLink.Description=Installerar Jenkins som en Windows-tjänst på detta system, så att Jenkins startar automatiskt när datorn startar.
WindowsSlaveInstaller.ConfirmInstallation=Detta kommer att installera en agent som en Windows-tjänst, så att en Jenkins-agent startar automatiskt när datorn startar.
WindowsSlaveInstaller.DotNetRequired=.NET Framework 4.0 eller senare krävs för den här funktionen
WindowsSlaveInstaller.InstallationSuccessful=Installationen lyckades. Vill du starta tjänsten nu?
diff --git a/core/src/main/resources/hudson/lifecycle/Messages_zh_TW.properties b/core/src/main/resources/hudson/lifecycle/Messages_zh_TW.properties
index 27ef89ad12ec..8e315e2996d2 100644
--- a/core/src/main/resources/hudson/lifecycle/Messages_zh_TW.properties
+++ b/core/src/main/resources/hudson/lifecycle/Messages_zh_TW.properties
@@ -20,7 +20,5 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
-WindowsInstallerLink.DisplayName=安裝成 Windows 服務
-WindowsInstallerLink.Description=將 Jenkins 安裝成 Windows 服務,開機後 Jenkins 就會自動啟動。
WindowsSlaveInstaller.DotNetRequired=本功能需要 .NET Framework 4.0 或是更新的版本
WindowsSlaveInstaller.InstallationSuccessful=安裝完成。您要馬上啟動服務嗎?
diff --git a/core/src/main/resources/hudson/lifecycle/WindowsInstallerLink/_restart.jelly b/core/src/main/resources/hudson/lifecycle/WindowsInstallerLink/_restart.jelly
deleted file mode 100644
index 5423852829c6..000000000000
--- a/core/src/main/resources/hudson/lifecycle/WindowsInstallerLink/_restart.jelly
+++ /dev/null
@@ -1,59 +0,0 @@
-
-
-
-
-
-
-
-
-
-
- ${h.initPageVariables(context)}
-
-
-
- ${%Restarting Jenkins}
-
-
-
-
-
-
-
-
diff --git a/core/src/main/resources/hudson/model/User/sidepanel.jelly b/core/src/main/resources/hudson/model/User/sidepanel.jelly
index f8024b0c21b8..787309d8a8e2 100644
--- a/core/src/main/resources/hudson/model/User/sidepanel.jelly
+++ b/core/src/main/resources/hudson/model/User/sidepanel.jelly
@@ -31,7 +31,7 @@ THE SOFTWARE.
-
+
diff --git a/core/src/main/resources/hudson/security/HudsonPrivateSecurityRealm/index.jelly b/core/src/main/resources/hudson/security/HudsonPrivateSecurityRealm/index.jelly
index 559e2370a720..4c0900b5ecde 100644
--- a/core/src/main/resources/hudson/security/HudsonPrivateSecurityRealm/index.jelly
+++ b/core/src/main/resources/hudson/security/HudsonPrivateSecurityRealm/index.jelly
@@ -52,7 +52,7 @@ THE SOFTWARE.
-
+
diff --git a/core/src/main/resources/hudson/security/HudsonPrivateSecurityRealm/signup.jelly b/core/src/main/resources/hudson/security/HudsonPrivateSecurityRealm/signup.jelly
index 0dc065a8290d..00f3622eb8e1 100644
--- a/core/src/main/resources/hudson/security/HudsonPrivateSecurityRealm/signup.jelly
+++ b/core/src/main/resources/hudson/security/HudsonPrivateSecurityRealm/signup.jelly
@@ -42,7 +42,7 @@ THE SOFTWARE.
- ${%Register} [Jenkins]
+ ${%Register} - Jenkins
diff --git a/core/src/main/resources/hudson/security/HudsonPrivateSecurityRealm/signup_it.properties b/core/src/main/resources/hudson/security/HudsonPrivateSecurityRealm/signup_it.properties
index 627f59f10c13..04fb99f7e824 100644
--- a/core/src/main/resources/hudson/security/HudsonPrivateSecurityRealm/signup_it.properties
+++ b/core/src/main/resources/hudson/security/HudsonPrivateSecurityRealm/signup_it.properties
@@ -27,7 +27,7 @@ A\ strong\ password\ is\ a\ long\ password\ that''s\ unique\ for\ every\ site.\
massimo di sicurezza.
Create\ account=Crea account
Create\ an\ account!=Crea un account!
-Create\ an\ account!\ [Jenkins]=Crea un account! [Jenkins]
+Create\ an\ account!\ -\ Jenkins=Crea un account! - Jenkins
Email=Indirizzo di posta elettronica
Enter\ text\ as\ shown=Immettere il testo così come viene visualizzato
Full\ name=Nome completo
diff --git a/core/src/main/resources/hudson/security/HudsonPrivateSecurityRealm/signup_pt_BR.properties b/core/src/main/resources/hudson/security/HudsonPrivateSecurityRealm/signup_pt_BR.properties
index 6daf2de489ca..b0ba3f224f49 100644
--- a/core/src/main/resources/hudson/security/HudsonPrivateSecurityRealm/signup_pt_BR.properties
+++ b/core/src/main/resources/hudson/security/HudsonPrivateSecurityRealm/signup_pt_BR.properties
@@ -24,7 +24,7 @@
Enter\ text\ as\ shown=Entre\ com\ texto\ conforme\ mostrado
Create\ account=Criar\ conta
Weak=Fraca
-Create\ an\ account!\ [Jenkins]=Criar\ uma\ conta!\ [Jenkins]
+Create\ an\ account!\ -\ Jenkins=Criar uma conta! - Jenkins
Strength=Força
Strong=Forte
please\ sign\ in.=Por\ favor\ dê\ entrada.
diff --git a/core/src/main/resources/hudson/security/HudsonPrivateSecurityRealm/signup_zh_TW.properties b/core/src/main/resources/hudson/security/HudsonPrivateSecurityRealm/signup_zh_TW.properties
index 228515573fe8..7c931616e2c0 100644
--- a/core/src/main/resources/hudson/security/HudsonPrivateSecurityRealm/signup_zh_TW.properties
+++ b/core/src/main/resources/hudson/security/HudsonPrivateSecurityRealm/signup_zh_TW.properties
@@ -22,7 +22,7 @@
A\ strong\ password\ is\ a\ long\ password\ that's\ unique\ for\ every\ site.\ Try\ using\ a\ phrase\ with\ 5-6\ words\ for\ the\ best\ security.=強健的密碼擁有較多字元且在不同系統使用獨特的密碼。請試著使用包含 5~6 個單字的句子以獲得最佳安全性。
If\ you\ already\ have\ a\ Jenkins\ account,=如果您有 Jenkins 帳戶了,
-Create\ an\ account\!\ [Jenkins]=建立新帳戶\! [Jenkins]
+Create\ an\ account\!\ -\ Jenkins=建立新帳戶\! - Jenkins
Strength=強度
please\ sign\ in.=請登入。
Show=顯示
diff --git a/core/src/main/resources/hudson/security/LegacySecurityRealm/config.groovy b/core/src/main/resources/hudson/security/LegacySecurityRealm/config.groovy
index 1d0d2eb4d9cb..eb2d814d6aad 100644
--- a/core/src/main/resources/hudson/security/LegacySecurityRealm/config.groovy
+++ b/core/src/main/resources/hudson/security/LegacySecurityRealm/config.groovy
@@ -7,12 +7,10 @@ import jenkins.model.Jenkins
def f = namespace(lib.FormTagLib)
f.entry(title: _('Unprotected URLs')) {
- p(class: "jenkins-form-description") {
- _('blurb')
- }
+ f.description(_('blurb'))
ul {
for (def action : Jenkins.get().getActions().sort { x, y -> x.getUrlName() <=> y.getUrlName() }) {
- if (action instanceof UnprotectedRootAction) {
+ if (action instanceof UnprotectedRootAction && action.getUrlName() != null) {
li {
a(href: '../' + action.getUrlName(), rel: 'noopener noreferrer', target: '_blank') {
code {
diff --git a/core/src/main/resources/hudson/security/LegacySecurityRealm/config_es.properties b/core/src/main/resources/hudson/security/LegacySecurityRealm/config_es.properties
index e44847c5e178..e9b07760c6f6 100644
--- a/core/src/main/resources/hudson/security/LegacySecurityRealm/config_es.properties
+++ b/core/src/main/resources/hudson/security/LegacySecurityRealm/config_es.properties
@@ -1,4 +1,6 @@
# This file is under the MIT License by authors
Unprotected\ URLs=URLs Desprotegidas
-blurb=Estas URLs (y las URLs que inician con el prefijo /) no requieren autenticación. Si es posible, configure su servidor para pasar esta solicitud a Jenkins si requerir autenticación.
+blurb=\
+ Estas URLs (y las URLs que inician con el prefijo /) no requieren autenticación. \
+ Si es posible, configure su servidor para pasar estas peticiones directamente a Jenkins sin requerir autenticación.
diff --git a/core/src/main/resources/hudson/widgets/HistoryWidget/entries.jelly b/core/src/main/resources/hudson/widgets/HistoryWidget/entries.jelly
index 7462269378a4..cae158f1f5aa 100644
--- a/core/src/main/resources/hudson/widgets/HistoryWidget/entries.jelly
+++ b/core/src/main/resources/hudson/widgets/HistoryWidget/entries.jelly
@@ -28,7 +28,11 @@ THE SOFTWARE.
-
+
+
+
+
+
diff --git a/core/src/main/resources/jenkins/management/AdministrativeMonitorsDecorator/resources.css b/core/src/main/resources/jenkins/management/AdministrativeMonitorsDecorator/resources.css
index 62ba95f86ae3..27540b350d84 100644
--- a/core/src/main/resources/jenkins/management/AdministrativeMonitorsDecorator/resources.css
+++ b/core/src/main/resources/jenkins/management/AdministrativeMonitorsDecorator/resources.css
@@ -29,7 +29,7 @@
color: #fff;
background-color: var(--warning-color);
- font-weight: 500;
+ font-weight: var(--font-bold-weight);
font-size: var(--font-size-xs);
border-radius: 16px;
diff --git a/core/src/main/resources/jenkins/model/Jenkins/login.jelly b/core/src/main/resources/jenkins/model/Jenkins/login.jelly
index 083566a62ac0..7b8f93aa086b 100644
--- a/core/src/main/resources/jenkins/model/Jenkins/login.jelly
+++ b/core/src/main/resources/jenkins/model/Jenkins/login.jelly
@@ -53,7 +53,7 @@ THE SOFTWARE.
- ${%signIn} [Jenkins]
+ ${%signIn} - Jenkins
diff --git a/core/src/main/resources/jenkins/security/ApiTokenProperty/resources.css b/core/src/main/resources/jenkins/security/ApiTokenProperty/resources.css
index b687efd47132..fc00ab151f67 100644
--- a/core/src/main/resources/jenkins/security/ApiTokenProperty/resources.css
+++ b/core/src/main/resources/jenkins/security/ApiTokenProperty/resources.css
@@ -35,7 +35,7 @@
.token-list .token-list-item {
min-height: inherit;
padding: 8px 10px;
- font-size: 0.875rem;
+ font-size: var(--font-size-sm);
line-height: 26px;
}
.token-list .token-list-item.legacy-token {
diff --git a/core/src/main/resources/lib/layout/layout.jelly b/core/src/main/resources/lib/layout/layout.jelly
index d96e6ead76d2..0fb62437aa57 100644
--- a/core/src/main/resources/lib/layout/layout.jelly
+++ b/core/src/main/resources/lib/layout/layout.jelly
@@ -109,7 +109,7 @@ THE SOFTWARE.
${h.checkPermission(it,permission)}
${h.checkAnyPermission(it, permissions)}
- ${h.appendIfNotNull(title, ' [Jenkins]', 'Jenkins')}
+ ${h.appendIfNotNull(title, ' - Jenkins', 'Jenkins')}
diff --git a/core/src/main/resources/lib/layout/search-bar.jelly b/core/src/main/resources/lib/layout/search-bar.jelly
index 2d67a3512f7f..10b113dd6585 100644
--- a/core/src/main/resources/lib/layout/search-bar.jelly
+++ b/core/src/main/resources/lib/layout/search-bar.jelly
@@ -48,7 +48,7 @@ THE SOFTWARE.
-
diff --git a/core/src/test/java/hudson/os/DCOMSandbox.java b/core/src/test/java/hudson/os/DCOMSandbox.java
deleted file mode 100644
index 340f7182644c..000000000000
--- a/core/src/test/java/hudson/os/DCOMSandbox.java
+++ /dev/null
@@ -1,82 +0,0 @@
-package hudson.os;
-
-import java.util.Properties;
-import ndr.NdrObject;
-import ndr.NetworkDataRepresentation;
-import org.jinterop.dcom.transport.JIComTransportFactory;
-import rpc.Endpoint;
-import rpc.Stub;
-
-/**
- * My attempt to see if ServerAlive calls can be used to detect an authentication failure
- * (so that I can differentiate authentication problem against authorization problem in
- * creating an instance.
- *
- *
- * It turns out that the bogus credential works with ServerAlive. The
- * protocol specification
- * explicitly says this RPC must not check the credential.
- *
- *
- * The feature in question of Windows is called "ForceGuest", and it's recorded in the registry at
- * HKLM\SYSTEM\CurrentControlSet\Control\LSA\forceguest (0=classic, 1=forceguest).
- * KB 290403
- *
- * @author Kohsuke Kawaguchi
- */
-public class DCOMSandbox {
- public static void main(String[] args) throws Exception {
- new JIComOxidStub("129.145.133.224", "", "bogus", "bogus").serverAlive();
- }
-
- static final class JIComOxidStub extends Stub {
-
- private static Properties defaults = new Properties();
-
- static {
- defaults.put("rpc.ntlm.lanManagerKey", "false");
- defaults.put("rpc.ntlm.sign", "false");
- defaults.put("rpc.ntlm.seal", "false");
- defaults.put("rpc.ntlm.keyExchange", "false");
- defaults.put("rpc.connectionContext", "rpc.security.ntlm.NtlmConnectionContext");
- }
-
- @Override
- protected String getSyntax() {
- return "99fcfec4-5260-101b-bbcb-00aa0021347a:0.0";
- }
-
- JIComOxidStub(String address, String domain, String username, String password) {
- setTransportFactory(JIComTransportFactory.getSingleTon());
- setProperties(new Properties(defaults));
- getProperties().setProperty("rpc.security.username", username);
- getProperties().setProperty("rpc.security.password", password);
- getProperties().setProperty("rpc.ntlm.domain", domain);
- setAddress("ncacn_ip_tcp:" + address + "[135]");
-
- }
-
- public void serverAlive() throws Exception {
- call(Endpoint.IDEMPOTENT, new ServerAlive());
- }
- }
-
- static class ServerAlive extends NdrObject {
- // see http://www.hsc.fr/ressources/articles/win_net_srv/rpcss_dcom_interfaces.html
-
- @Override
- public int getOpnum() {
- return 3;
- }
-
- @Override
- public void write(NetworkDataRepresentation ndr) {
- // no parameter
- }
-
- @Override
- public void read(NetworkDataRepresentation ndr) {
- System.out.println("Got " + ndr.readUnsignedLong());
- }
- }
-}
diff --git a/core/src/test/java/hudson/os/SUTester.java b/core/src/test/java/hudson/os/SUTester.java
deleted file mode 100644
index 2995e493c92a..000000000000
--- a/core/src/test/java/hudson/os/SUTester.java
+++ /dev/null
@@ -1,24 +0,0 @@
-package hudson.os;
-
-import hudson.util.StreamTaskListener;
-import java.io.File;
-import java.nio.file.Files;
-import jenkins.security.MasterToSlaveCallable;
-
-/**
- * @author Kohsuke Kawaguchi
- */
-public class SUTester {
- public static void main(String[] args) throws Throwable {
- SU.execute(StreamTaskListener.fromStdout(), "kohsuke", "bogus", new TouchingCallable());
- }
-
- private static class TouchingCallable extends MasterToSlaveCallable