Skip to content

Commit 17f0524

Browse files
author
Beria
committed
Use diamond operator
1 parent 7852368 commit 17f0524

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/remote/AppendOutputRunner.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,7 @@ public class AppendOutputRunner implements Runnable {
4141
private static final Long SAFE_PROCESSING_TIME = new Long(10);
4242
private static final Long SAFE_PROCESSING_STRING_SIZE = new Long(100000);
4343

44-
private final BlockingQueue<AppendOutputBuffer> queue =
45-
new LinkedBlockingQueue<AppendOutputBuffer>();
44+
private final BlockingQueue<AppendOutputBuffer> queue = new LinkedBlockingQueue<>();
4645
private final RemoteInterpreterProcessListener listener;
4746

4847
public AppendOutputRunner(RemoteInterpreterProcessListener listener) {
@@ -53,7 +52,7 @@ public AppendOutputRunner(RemoteInterpreterProcessListener listener) {
5352
public void run() {
5453

5554
Map<String, Map<String, StringBuilder> > noteMap = new HashMap<>();
56-
List<AppendOutputBuffer> list = new LinkedList<AppendOutputBuffer>();
55+
List<AppendOutputBuffer> list = new LinkedList<>();
5756

5857
/* "drainTo" method does not wait for any element
5958
* to be present in the queue, and thus this loop would

zeppelin-interpreter/src/test/java/org/apache/zeppelin/interpreter/remote/AppendOutputRunnerTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ public void run() {
184184
}
185185

186186
private class TestAppender extends AppenderSkeleton {
187-
private final List<LoggingEvent> log = new ArrayList<LoggingEvent>();
187+
private final List<LoggingEvent> log = new ArrayList<>();
188188

189189
@Override
190190
public boolean requiresLayout() {
@@ -201,7 +201,7 @@ public void close() {
201201
}
202202

203203
public List<LoggingEvent> getLog() {
204-
return new ArrayList<LoggingEvent>(log);
204+
return new ArrayList<>(log);
205205
}
206206
}
207207

0 commit comments

Comments
 (0)