mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-14 12:32:15 +00:00
Use diamond operator where possible (#6764)
This commit is contained in:
1 parent
d16cec98fa
commit
a0faeaee3c
64 files changed
+103
-102
No files matched your search
@@ -33,13 +33,13 @@ public final class ChannelRule extends ExternalResource {
|
||||
final FastPipedOutputStream p1o = new FastPipedOutputStream(p1i);
|
||||
final FastPipedOutputStream p2o = new FastPipedOutputStream(p2i);
|
||||
|
||||
Future<Channel> f1 = executors.submit(new Callable<Channel>() {
|
||||
Future<Channel> f1 = executors.submit(new Callable<>() {
|
||||
@Override
|
||||
public Channel call() throws Exception {
|
||||
return new ChannelBuilder("This side of the channel", executors).withMode(Channel.Mode.BINARY).build(p1i, p2o);
|
||||
}
|
||||
});
|
||||
Future<Channel> f2 = executors.submit(new Callable<Channel>() {
|
||||
Future<Channel> f2 = executors.submit(new Callable<>() {
|
||||
@Override
|
||||
public Channel call() throws Exception {
|
||||
return new ChannelBuilder("The other side of the channel", executors).withMode(Channel.Mode.BINARY).build(p2i, p1o);
|
||||
|
||||
@@ -153,7 +153,7 @@ public class ListJobsCommandTest {
|
||||
|
||||
private TypeSafeMatcher<ByteArrayOutputStream> empty() {
|
||||
|
||||
return new TypeSafeMatcher<ByteArrayOutputStream>() {
|
||||
return new TypeSafeMatcher<>() {
|
||||
|
||||
@Override
|
||||
protected boolean matchesSafely(ByteArrayOutputStream item) {
|
||||
@@ -178,7 +178,7 @@ public class ListJobsCommandTest {
|
||||
|
||||
private TypeSafeMatcher<ByteArrayOutputStream> listsJobs(final String... expected) {
|
||||
|
||||
return new TypeSafeMatcher<ByteArrayOutputStream>() {
|
||||
return new TypeSafeMatcher<>() {
|
||||
|
||||
@Override
|
||||
protected boolean matchesSafely(ByteArrayOutputStream item) {
|
||||
|
||||
@@ -69,7 +69,7 @@ public class DescribableListTest {
|
||||
|
||||
@Override
|
||||
public Descriptor<Datum> getDescriptor() {
|
||||
return new Descriptor<Datum>(Datum.class) {};
|
||||
return new Descriptor<>(Datum.class) {};
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in new issue
Block a user