mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-10 10:36:21 +00:00
88 files changed
+124
-215
No files matched your search
@@ -1541,9 +1541,6 @@ public class Functions {
|
||||
sb.append('\n');
|
||||
break;
|
||||
case WAITING:
|
||||
sb.append("\t- waiting on ").append(ti.getLockInfo());
|
||||
sb.append('\n');
|
||||
break;
|
||||
case TIMED_WAITING:
|
||||
sb.append("\t- waiting on ").append(ti.getLockInfo());
|
||||
sb.append('\n');
|
||||
|
||||
@@ -125,7 +125,6 @@ import java.net.URL;
|
||||
import java.net.URLClassLoader;
|
||||
import java.net.URLConnection;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.Enumeration;
|
||||
@@ -555,7 +554,6 @@ public abstract class PluginManager extends AbstractModelObject implements OnMas
|
||||
activePlugins.remove(p);
|
||||
plugins.remove(p);
|
||||
LOGGER.log(Level.SEVERE, "Failed to install {0}: {1}", new Object[] { p.getShortName(), e.getMessage() });
|
||||
return;
|
||||
} catch (IOException e) {
|
||||
failedPlugins.add(new FailedPlugin(p.getShortName(), e));
|
||||
activePlugins.remove(p);
|
||||
|
||||
@@ -61,7 +61,6 @@ import java.net.URL;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.InvalidPathException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.Enumeration;
|
||||
|
||||
@@ -49,7 +49,6 @@ import org.kohsuke.args4j.Argument;
|
||||
import org.kohsuke.args4j.CmdLineException;
|
||||
import org.kohsuke.args4j.Option;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.Map;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
@@ -46,7 +46,6 @@ import hudson.util.XStream2;
|
||||
|
||||
import jenkins.fingerprints.FileFingerprintStorage;
|
||||
import jenkins.fingerprints.FingerprintStorage;
|
||||
import jenkins.fingerprints.GlobalFingerprintConfiguration;
|
||||
import jenkins.model.FingerprintFacet;
|
||||
import jenkins.model.Jenkins;
|
||||
import jenkins.model.TransientFingerprintFacetFactory;
|
||||
|
||||
@@ -76,11 +76,7 @@ public class Items {
|
||||
* @see Trigger#start
|
||||
* @since 1.482
|
||||
*/
|
||||
private static final ThreadLocal<Boolean> updatingByXml = new ThreadLocal<Boolean>() {
|
||||
@Override protected Boolean initialValue() {
|
||||
return false;
|
||||
}
|
||||
};
|
||||
private static final ThreadLocal<Boolean> updatingByXml = ThreadLocal.withInitial(() -> false);
|
||||
/**
|
||||
* A comparator of {@link Item} instances that uses a case-insensitive comparison of {@link Item#getName()}.
|
||||
* If you are replacing {@link #getAllItems(ItemGroup, Class)} with {@link #allItems(ItemGroup, Class)} and
|
||||
@@ -472,8 +468,8 @@ public class Items {
|
||||
*
|
||||
* @param root the root.
|
||||
* @param type the type.
|
||||
* @param pred the predicate.
|
||||
* @param <T> the type.
|
||||
* @param <T> the predicate.
|
||||
* @return An {@link Iterable} for all items.
|
||||
* @since 2.221
|
||||
*/
|
||||
|
||||
@@ -64,7 +64,6 @@ import java.util.Comparator;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
import java.util.Stack;
|
||||
import java.util.TreeSet;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.StreamSupport;
|
||||
|
||||
@@ -31,7 +31,6 @@ import hudson.model.queue.MappingWorksheet;
|
||||
import hudson.model.queue.MappingWorksheet.ExecutorChunk;
|
||||
import hudson.model.queue.MappingWorksheet.Mapping;
|
||||
import hudson.util.ConsistentHash;
|
||||
import hudson.util.ConsistentHash.Hash;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
@@ -83,11 +82,7 @@ public abstract class LoadBalancer implements ExtensionPoint {
|
||||
// build consistent hash for each work chunk
|
||||
List<ConsistentHash<ExecutorChunk>> hashes = new ArrayList<>(ws.works.size());
|
||||
for (int i=0; i<ws.works.size(); i++) {
|
||||
ConsistentHash<ExecutorChunk> hash = new ConsistentHash<>(new Hash<ExecutorChunk>() {
|
||||
public String hash(ExecutorChunk node) {
|
||||
return node.getName();
|
||||
}
|
||||
});
|
||||
ConsistentHash<ExecutorChunk> hash = new ConsistentHash<>(ExecutorChunk::getName);
|
||||
|
||||
// Build a Map to pass in rather than repeatedly calling hash.add() because each call does lots of expensive work
|
||||
List<ExecutorChunk> chunks = ws.works(i).applicableExecutorChunks();
|
||||
|
||||
@@ -29,7 +29,6 @@ import hudson.FilePath;
|
||||
import hudson.Functions;
|
||||
import jenkins.util.SystemProperties;
|
||||
import hudson.Util;
|
||||
import hudson.slaves.WorkspaceList;
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
|
||||
@@ -48,7 +48,6 @@ import java.io.BufferedReader;
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.DataInputStream;
|
||||
import java.io.File;
|
||||
import java.io.FileFilter;
|
||||
import java.io.FileReader;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
@@ -741,11 +740,7 @@ public abstract class ProcessTree implements Iterable<OSProcess>, IProcessTree,
|
||||
ProcfsUnix(boolean vetoersExist) {
|
||||
super(vetoersExist);
|
||||
|
||||
File[] processes = new File("/proc").listFiles(new FileFilter() {
|
||||
public boolean accept(File f) {
|
||||
return f.isDirectory();
|
||||
}
|
||||
});
|
||||
File[] processes = new File("/proc").listFiles(File::isDirectory);
|
||||
if(processes==null) {
|
||||
LOGGER.info("No /proc");
|
||||
return;
|
||||
|
||||
@@ -23,9 +23,6 @@
|
||||
*/
|
||||
package hudson.util;
|
||||
|
||||
import org.kohsuke.accmod.Restricted;
|
||||
import org.kohsuke.accmod.restrictions.NoExternalUse;
|
||||
|
||||
import java.util.AbstractList;
|
||||
import java.util.List;
|
||||
import java.util.logging.Handler;
|
||||
|
||||
@@ -27,7 +27,6 @@ import hudson.DescriptorExtensionList;
|
||||
import hudson.Extension;
|
||||
import hudson.ExtensionPoint;
|
||||
import hudson.model.AbstractDescribableImpl;
|
||||
import hudson.util.CaseInsensitiveComparator;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.jenkinsci.Symbol;
|
||||
import org.kohsuke.accmod.Restricted;
|
||||
|
||||
@@ -2,7 +2,6 @@ package jenkins.security.s2m;
|
||||
|
||||
import hudson.Extension;
|
||||
import hudson.model.AdministrativeMonitor;
|
||||
import org.apache.tools.ant.taskdefs.condition.IsSet;
|
||||
import org.kohsuke.stapler.HttpResponse;
|
||||
import org.kohsuke.stapler.HttpResponses;
|
||||
import org.kohsuke.stapler.QueryParameter;
|
||||
|
||||
@@ -3,9 +3,7 @@ package jenkins.slaves.systemInfo;
|
||||
import hudson.ExtensionList;
|
||||
import hudson.ExtensionPoint;
|
||||
import hudson.model.Computer;
|
||||
import hudson.model.ManageJenkinsAction;
|
||||
import hudson.security.Permission;
|
||||
import jenkins.model.Jenkins;
|
||||
|
||||
/**
|
||||
* Extension point that contributes to the system information page of {@link Computer}.
|
||||
|
||||
@@ -31,7 +31,6 @@ import org.jaxen.XPathFunctionContext;
|
||||
import org.kohsuke.accmod.Restricted;
|
||||
import org.kohsuke.accmod.restrictions.NoExternalUse;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.HashSet;
|
||||
import java.util.Locale;
|
||||
|
||||
@@ -26,7 +26,6 @@ package org.acegisecurity.context;
|
||||
|
||||
import hudson.model.User;
|
||||
import hudson.security.ACL;
|
||||
import org.acegisecurity.Authentication;
|
||||
|
||||
/**
|
||||
* @deprecated Use {@link ACL#as(User)} or {@link org.springframework.security.core.context.SecurityContext}.
|
||||
|
||||
-1
@@ -24,7 +24,6 @@
|
||||
|
||||
package org.acegisecurity.providers;
|
||||
|
||||
import hudson.security.ACL;
|
||||
import org.acegisecurity.Authentication;
|
||||
import org.acegisecurity.GrantedAuthority;
|
||||
import org.acegisecurity.userdetails.UserDetails;
|
||||
|
||||
@@ -45,7 +45,7 @@ public class Icon {
|
||||
public static final String ICON_LARGE_STYLE = "width: 32px; height: 32px;";
|
||||
public static final String ICON_XLARGE_STYLE = "width: 48px; height: 48px;";
|
||||
|
||||
private static final Map<String, String> iconDims = new HashMap<String, String>();
|
||||
private static final Map<String, String> iconDims = new HashMap<>();
|
||||
|
||||
static {
|
||||
iconDims.put("16x16", "icon-sm");
|
||||
@@ -216,7 +216,7 @@ public class Icon {
|
||||
}
|
||||
|
||||
String[] classNameTokA = classNames.split(" ");
|
||||
List<String> classNameTokL = new ArrayList<String>();
|
||||
List<String> classNameTokL = new ArrayList<>();
|
||||
|
||||
// Trim all tokens first
|
||||
for (String classNameTok : classNameTokA) {
|
||||
|
||||
@@ -37,10 +37,10 @@ public class IconSet {
|
||||
|
||||
public static final IconSet icons = new IconSet();
|
||||
|
||||
private Map<String, Icon> iconsByCSSSelector = new ConcurrentHashMap<String, Icon>();
|
||||
private Map<String, Icon> iconsByUrl = new ConcurrentHashMap<String, Icon>();
|
||||
private Map<String, Icon> iconsByClassSpec = new ConcurrentHashMap<String, Icon>();
|
||||
private Map<String, Icon> coreIcons = new ConcurrentHashMap<String, Icon>();
|
||||
private Map<String, Icon> iconsByCSSSelector = new ConcurrentHashMap<>();
|
||||
private Map<String, Icon> iconsByUrl = new ConcurrentHashMap<>();
|
||||
private Map<String, Icon> iconsByClassSpec = new ConcurrentHashMap<>();
|
||||
private Map<String, Icon> coreIcons = new ConcurrentHashMap<>();
|
||||
|
||||
private static final Icon NO_ICON = new Icon("_", "_", "_");
|
||||
|
||||
|
||||
@@ -24,7 +24,6 @@
|
||||
package org.jenkins.ui.icon;
|
||||
|
||||
import org.apache.commons.jelly.JellyContext;
|
||||
import org.kohsuke.stapler.Stapler;
|
||||
|
||||
/**
|
||||
* Icon type.
|
||||
|
||||
@@ -26,7 +26,6 @@ package org.springframework.dao;
|
||||
|
||||
import hudson.security.UserMayOrMayNotExistException2;
|
||||
import org.springframework.core.NestedRuntimeException;
|
||||
import org.springframework.security.core.userdetails.UsernameNotFoundException;
|
||||
|
||||
/**
|
||||
* @deprecated no replacement
|
||||
|
||||
Reference in new issue
Block a user