提交 bedf304c 编写于 作者: J Jesse Glick

Merge branch 'security-stable-1.625' into SECURITY-353

......@@ -680,7 +680,7 @@ public abstract class Job<JobT extends Job<JobT, RunT>, RunT extends Run<JobT, R
@Exported(name="allBuilds",visibility=-2)
@WithBridgeMethods(List.class)
public RunList<RunT> getBuilds() {
return RunList.fromRuns(_getRuns().values());
return RunList.<RunT>fromRuns(_getRuns().values());
}
/**
......@@ -712,7 +712,7 @@ public abstract class Job<JobT extends Job<JobT, RunT>, RunT extends Run<JobT, R
* Gets all the builds in a map.
*/
public SortedMap<Integer, RunT> getBuildsAsMap() {
return Collections.unmodifiableSortedMap(_getRuns());
return Collections.<Integer, RunT>unmodifiableSortedMap(_getRuns());
}
/**
......
......@@ -49,7 +49,7 @@ import java.util.Set;
import java.util.logging.Level;
import java.util.logging.Logger;
import static com.google.common.collect.Lists.newArrayList;
import com.google.common.collect.Lists;
import static com.google.common.collect.Sets.newHashSet;
import javax.annotation.CheckForNull;
import javax.annotation.Nonnull;
......@@ -144,7 +144,7 @@ public class ParametersAction implements RunAction2, Iterable<ParameterValue>, Q
@Exported(visibility=2)
public List<ParameterValue> getParameters() {
return Collections.unmodifiableList(filter(parameters));
return Collections.<ParameterValue>unmodifiableList(filter(parameters));
}
public ParameterValue getParameter(String name) {
......@@ -204,7 +204,7 @@ public class ParametersAction implements RunAction2, Iterable<ParameterValue>, Q
if(overrides == null) {
return new ParametersAction(parameters);
}
List<ParameterValue> combinedParameters = newArrayList(overrides);
List<ParameterValue> combinedParameters = Lists.<ParameterValue>newArrayList(overrides);
Set<String> names = newHashSet();
for(ParameterValue v : overrides) {
......
......@@ -86,7 +86,7 @@ public abstract class ToolDescriptor<T extends ToolInstallation> extends Descrip
* Lists up {@link ToolPropertyDescriptor}s that are applicable to this {@link ToolInstallation}.
*/
public List<ToolPropertyDescriptor> getPropertyDescriptors() {
return PropertyDescriptor.for_(ToolProperty.all(),clazz);
return PropertyDescriptor.<ToolPropertyDescriptor, ToolInstallation>for_(ToolProperty.all(), clazz);
}
/**
......
......@@ -143,7 +143,7 @@ public class CopyOnWriteList<E> implements Iterable<E> {
}
public List<E> getView() {
return Collections.unmodifiableList(core);
return Collections.<E>unmodifiableList(core);
}
public void addAllTo(Collection<? super E> dst) {
......
......@@ -24,6 +24,7 @@
package hudson.util;
import com.google.common.base.Predicates;
import com.google.common.collect.ImmutableList;
import java.util.Collections;
import java.util.Iterator;
......@@ -314,12 +315,13 @@ public class Iterators {
* <p>
* That is, this creates {A,B,C,D} from {A,B},{C,D}.
*/
@SafeVarargs
public static <T> Iterable<T> sequence( final Iterable<? extends T>... iterables ) {
return new Iterable<T>() {
public Iterator<T> iterator() {
return new FlattenIterator<T,Iterable<? extends T>>(Arrays.asList(iterables)) {
return new FlattenIterator<T,Iterable<? extends T>>(ImmutableList.copyOf(iterables)) {
protected Iterator<T> expand(Iterable<? extends T> iterable) {
return cast(iterable).iterator();
return Iterators.<T>cast(iterable).iterator();
}
};
}
......@@ -350,8 +352,9 @@ public class Iterators {
};
}
@SafeVarargs
public static <T> Iterator<T> sequence(Iterator<? extends T>... iterators) {
return com.google.common.collect.Iterators.concat(iterators);
return com.google.common.collect.Iterators.<T>concat(iterators);
}
/**
......
......@@ -43,7 +43,7 @@ public class InterruptedBuildAction extends InvisibleAction {
private final List<CauseOfInterruption> causes;
public InterruptedBuildAction(Collection<? extends CauseOfInterruption> causes) {
this.causes = ImmutableList.copyOf(causes);
this.causes = ImmutableList.<CauseOfInterruption>copyOf(causes);
}
@Exported
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册