Placate the JDK 9 compiler #2595

Merged
merged 1 commit into from Oct 19, 2016

Conversation

4 participants
@jglick
Member

jglick commented Oct 17, 2016

JDK-8075793

Useful preparation, and allows newer versions of NetBeans to edit Jenkins sources despite NB bug 268452.

@reviewbybees

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)) {

This comment has been minimized.

@jglick

jglick Oct 17, 2016

Member

Not really related but figured I would solve some other compiler warnings while I was here.

@jglick

jglick Oct 17, 2016

Member

Not really related but figured I would solve some other compiler warnings while I was here.

@@ -350,8 +352,9 @@ protected boolean filter(T t) {
};
}
+ @SafeVarargs

This comment has been minimized.

@jglick

jglick Oct 17, 2016

Member

Ditto. Internally concat calls ImmutableList.copyOf.

@jglick

jglick Oct 17, 2016

Member

Ditto. Internally concat calls ImmutableList.copyOf.

@reviewbybees

This comment has been minimized.

Show comment
Hide comment
@reviewbybees

reviewbybees Oct 17, 2016

This pull request originates from a CloudBees employee. At CloudBees, we require that all pull requests be reviewed by other CloudBees employees before we seek to have the change accepted. If you want to learn more about our process please see this explanation.

This pull request originates from a CloudBees employee. At CloudBees, we require that all pull requests be reviewed by other CloudBees employees before we seek to have the change accepted. If you want to learn more about our process please see this explanation.

@oleg-nenashev

This comment has been minimized.

Show comment
Hide comment
Member

oleg-nenashev commented Oct 17, 2016

🐝

@jglick

This comment has been minimized.

Show comment
Hide comment
Member

jglick commented Oct 18, 2016

@jglick jglick added ready-for-merge and removed needs-review labels Oct 18, 2016

@reviewbybees

This comment has been minimized.

Show comment
Hide comment
@reviewbybees

reviewbybees Oct 18, 2016

This pull request has completed our internal processes and we now respectfully request the maintainers of this repository to consider our proposal contained within this pull request for merging.

This pull request has completed our internal processes and we now respectfully request the maintainers of this repository to consider our proposal contained within this pull request for merging.

@daniel-beck daniel-beck merged commit 5537b31 into jenkinsci:master Oct 19, 2016

2 checks passed

Jenkins This pull request looks good
Details
continuous-integration/jenkins/pr-head This commit looks good
Details

@jglick jglick deleted the jglick:jdk9-generics branch Oct 24, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment