mirror of
https://github.com/processing/processing4.git
synced 2026-06-16 04:26:26 +02:00
Fix Java 5 incompatibility; sorry Ben.
This commit is contained in:
@@ -32,7 +32,6 @@ public class AndroidDevice implements AndroidDeviceProperties {
|
||||
// adb shell am start -n com.android.launcher2/.Launcher
|
||||
|
||||
private class LogLineProcessor implements LineProcessor {
|
||||
@Override
|
||||
public void processLine(final String line) {
|
||||
final LogEntry entry = new LogEntry(line);
|
||||
|
||||
|
||||
@@ -9,18 +9,15 @@ public class Harness implements AndroidEnvironmentProperties,
|
||||
final AndroidEnvironment env = new AndroidEnvironment();
|
||||
env.addPropertyChangeListener(PCD);
|
||||
env.addPropertyChangeListener(new PropertyChangeListener() {
|
||||
@Override
|
||||
public void propertyChange(final PropertyChangeEvent evt) {
|
||||
if (evt.getPropertyName().equals(DEVICE_ADDED)) {
|
||||
final AndroidDevice device = (AndroidDevice) evt.getNewValue();
|
||||
device.addOutputListener("processing.android.test.testconsole",
|
||||
new ProcessOutputListener() {
|
||||
@Override
|
||||
public void handleStdout(final String line) {
|
||||
System.out.println("testconsole: " + line);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void handleStderr(final String line) {
|
||||
System.err.println("testconsole: " + line);
|
||||
}
|
||||
@@ -28,12 +25,10 @@ public class Harness implements AndroidEnvironmentProperties,
|
||||
|
||||
device.addOutputListener("processing.android.test.testmouse",
|
||||
new ProcessOutputListener() {
|
||||
@Override
|
||||
public void handleStdout(final String line) {
|
||||
System.out.println("testmouse: " + line);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void handleStderr(final String line) {
|
||||
System.err.println("testmouse: " + line);
|
||||
}
|
||||
|
||||
@@ -19,7 +19,6 @@ public class ProcessResult implements Iterable<String> {
|
||||
this.time = time;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Iterator<String> iterator() {
|
||||
return Arrays.asList(output.split("\r?\n")).iterator();
|
||||
}
|
||||
|
||||
@@ -48,7 +48,6 @@ class SketchLogCatter implements LineProcessor {
|
||||
process.waitFor();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void processLine(final String line) {
|
||||
final Matcher m = interestingLine.matcher(line);
|
||||
if (m.matches()) {
|
||||
|
||||
@@ -29,7 +29,6 @@ import java.util.concurrent.ThreadFactory;
|
||||
class StreamPump implements Runnable {
|
||||
private static final ExecutorService threads = Executors
|
||||
.newCachedThreadPool(new ThreadFactory() {
|
||||
@Override
|
||||
public Thread newThread(final Runnable r) {
|
||||
final Thread t = new Thread(r);
|
||||
t.setDaemon(true);
|
||||
@@ -64,7 +63,6 @@ class StreamPump implements Runnable {
|
||||
threads.execute(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
try {
|
||||
String line;
|
||||
@@ -92,7 +90,6 @@ class StreamPump implements Runnable {
|
||||
this.writer = new PrintWriter(writer, true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void processLine(final String line) {
|
||||
writer.println(line);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user