Repository: jenkinsci/jenkins
File: core/src/main/java/jenkins/slaves/restarter/JnlpSlaveRestarterInstaller.java (Java)

Code before:
import hudson.slaves.ComputerListener;
import hudson.slaves.DumbSlave;
import java.io.IOException;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.Callable;
import java.util.logging.Logger;
import jenkins.security.MasterToSlaveCallable;
import jenkins.util.SystemProperties;

/**
 * Actual agent restart logic.
 *
 * <p>
 *     Use {@link ComputerListener} to install {@link EngineListener} on {@link hudson.model.Computer} instances tied to {@link DumbSlave},
 *     which in turn gets executed when the agent gets disconnected.
 *
 * @author Kohsuke Kawaguchi
 */
@Extension
public class JnlpSlaveRestarterInstaller extends ComputerListener implements Serializable {
    /**
     * To force installer to run on all agents, set this system property to true.
     */
    private static final boolean FORCE_INSTALL = SystemProperties.getBoolean(JnlpSlaveRestarterInstaller.class.getName() + ".forceInstall");

    @SuppressFBWarnings(value = "RV_RETURN_VALUE_IGNORED_BAD_PRACTICE", justification = "method signature does not permit plumbing through the return value")
    @Override
    public void onOnline(final Computer c, final TaskListener listener) throws IOException, InterruptedException {
        if (FORCE_INSTALL || c.getNode() instanceof DumbSlave) {
            Computer.threadPoolForRemoting.submit(new Install(c, listener));
        }
    }

    private static class Install implements Callable<Void> {
        private final Computer c;
        private final TaskListener listener;

        Install(Computer c, TaskListener listener) {
            this.c = c;
            this.listener = listener;
        }

        @Override
        public Void call() throws Exception {
            install(c, listener);
            return null;
        }

        private static void install(Computer c, TaskListener listener) {

Review comment (suggestion):
Please explain why this change was made.  Specifically, explain why it is important that the added feature of [SystemProperties consulting the ServletContext](https://javadoc.jenkins.io/jenkins/util/SystemProperties.html#getBoolean(java.lang.String)) is important in this case.  I've seen no indication that the ServletContext has a `FORCE_INSTALL` property.
```suggestion
    private static final boolean FORCE_INSTALL = Boolean.getBoolean(JnlpSlaveRestarterInstaller.class.getName() + ".forceInstall");
```

Code after:
import hudson.slaves.ComputerListener;
import hudson.slaves.DumbSlave;
import java.io.IOException;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.Callable;
import java.util.logging.Logger;
import jenkins.security.MasterToSlaveCallable;

/**
 * Actual agent restart logic.
 *
 * <p>
 *     Use {@link ComputerListener} to install {@link EngineListener} on {@link hudson.model.Computer} instances tied to {@link DumbSlave},
 *     which in turn gets executed when the agent gets disconnected.
 *
 * @author Kohsuke Kawaguchi
 */
@Extension
public class JnlpSlaveRestarterInstaller extends ComputerListener implements Serializable {
    /**
     * To force installer to run on all agents, set this system property to true.
     */
    private static final boolean FORCE_INSTALL = Boolean.getBoolean(JnlpSlaveRestarterInstaller.class.getName() + ".forceInstall");

    @SuppressFBWarnings(value = "RV_RETURN_VALUE_IGNORED_BAD_PRACTICE", justification = "method signature does not permit plumbing through the return value")
    @Override
    public void onOnline(final Computer c, final TaskListener listener) throws IOException, InterruptedException {
        if (FORCE_INSTALL || c.getNode() instanceof DumbSlave) {
            Computer.threadPoolForRemoting.submit(new Install(c, listener));
        }
    }

    private static class Install implements Callable<Void> {
        private final Computer c;
        private final TaskListener listener;

        Install(Computer c, TaskListener listener) {
            this.c = c;
            this.listener = listener;
        }

        @Override
        public Void call() throws Exception {
            install(c, listener);
            return null;
        }

        private static void install(Computer c, TaskListener listener) {
            try {