Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKarsten Thoms2017-08-16 16:24:52 -0400
committerAlexander Kurtakov2017-09-06 06:43:46 -0400
commitd8621eaf55a1e95ff894dda0a241af08cc6111fe (patch)
treec25456438000b8f21bfd4173f6910cba71bf138a /org.eclipse.debug.core
parent1ac7a50083b25934db5e4902343c7a186435763b (diff)
downloadeclipse.platform.debug-I20170906-0815.tar.gz
eclipse.platform.debug-I20170906-0815.tar.xz
eclipse.platform.debug-I20170906-0815.zip
Bug 521038 - Replaced anonymous Runnable classes by lambda expressionI20170906-2000I20170906-0815
Change-Id: Ia0d3478be72f514cce6e57cb679fa60668bdb23f Signed-off-by: Karsten Thoms <karsten.thoms@itemis.de>
Diffstat (limited to 'org.eclipse.debug.core')
-rw-r--r--org.eclipse.debug.core/core/org/eclipse/debug/internal/core/InputStreamMonitor.java7
-rw-r--r--org.eclipse.debug.core/core/org/eclipse/debug/internal/core/NullStreamsProxy.java21
-rw-r--r--org.eclipse.debug.core/core/org/eclipse/debug/internal/core/OutputStreamMonitor.java7
3 files changed, 11 insertions, 24 deletions
diff --git a/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/InputStreamMonitor.java b/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/InputStreamMonitor.java
index 3196df3ea..65265e9bb 100644
--- a/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/InputStreamMonitor.java
+++ b/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/InputStreamMonitor.java
@@ -94,12 +94,7 @@ public class InputStreamMonitor {
*/
public void startMonitoring() {
if (fThread == null) {
- fThread= new Thread(new Runnable() {
- @Override
- public void run() {
- write();
- }
- }, DebugCoreMessages.InputStreamMonitor_label);
+ fThread = new Thread((Runnable) () -> write(), DebugCoreMessages.InputStreamMonitor_label);
fThread.setDaemon(true);
fThread.start();
}
diff --git a/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/NullStreamsProxy.java b/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/NullStreamsProxy.java
index 4e4ae7064..29fdc0e5e 100644
--- a/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/NullStreamsProxy.java
+++ b/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/NullStreamsProxy.java
@@ -65,18 +65,15 @@ public class NullStreamsProxy implements IStreamsProxy2 {
}
private void startReaderThread() {
- Thread thread = new Thread(new Runnable() {
- @Override
- public void run() {
- byte[] bytes = new byte[1024];
- try {
- while(fStream.read(bytes) >= 0) {
- //do nothing
- }
- } catch (IOException e) {
- }
- }
- }, DebugCoreMessages.NullStreamsProxy_0);
+ Thread thread = new Thread((Runnable) () -> {
+ byte[] bytes = new byte[1024];
+ try {
+ while (fStream.read(bytes) >= 0) {
+ // do nothing
+ }
+ } catch (IOException e) {
+ }
+ }, DebugCoreMessages.NullStreamsProxy_0);
thread.setDaemon(true);
thread.start();
diff --git a/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/OutputStreamMonitor.java b/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/OutputStreamMonitor.java
index 0b35caa54..6cd906330 100644
--- a/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/OutputStreamMonitor.java
+++ b/org.eclipse.debug.core/core/org/eclipse/debug/internal/core/OutputStreamMonitor.java
@@ -206,12 +206,7 @@ public class OutputStreamMonitor implements IFlushableStreamMonitor {
*/
protected void startMonitoring() {
if (fThread == null) {
- fThread= new Thread(new Runnable() {
- @Override
- public void run() {
- read();
- }
- }, DebugCoreMessages.OutputStreamMonitor_label);
+ fThread = new Thread((Runnable) () -> read(), DebugCoreMessages.OutputStreamMonitor_label);
fThread.setDaemon(true);
fThread.setPriority(Thread.MIN_PRIORITY);
fThread.start();

Back to the top