inspection cleanups

This commit is contained in:
Matthew Kennedy 2023-10-31 00:50:15 -07:00
parent e89cba2b67
commit 6f3bf87199
5 changed files with 5 additions and 24 deletions

View File

@ -96,11 +96,6 @@ public class SimulatorExecHelper {
if (!new File(SIMULATOR_BINARY).exists())
throw new IllegalStateException(SIMULATOR_BINARY + " not found");
FileLog.MAIN.logLine("startSimulator...");
new Thread(new Runnable() {
@Override
public void run() {
runSimulator();
}
}, "simulator process").start();
new Thread(SimulatorExecHelper::runSimulator, "simulator process").start();
}
}

View File

@ -10,12 +10,7 @@ public abstract class StreamFile {
protected Writer writer;
public StreamFile() {
Runtime.getRuntime().addShutdownHook(new Thread(new Runnable() {
@Override
public void run() {
close();
}
}));
Runtime.getRuntime().addShutdownHook(new Thread(this::close));
}
public abstract void append(List<CompositeEvent> events);

View File

@ -18,11 +18,7 @@ public class ResponseBufferTest {
public void testSingleLine() {
final AtomicReference<String> currentReference = new AtomicReference<>();
ResponseBuffer rb = new ResponseBuffer(new ResponseBuffer.ResponseListener() {
public void onResponse(String response) {
currentReference.set(response);
}
});
ResponseBuffer rb = new ResponseBuffer(currentReference::set);
rb.append("\r", LinkDecoder.VOID);
assertNull(currentReference.get());
rb.append("\n", LinkDecoder.VOID);

View File

@ -32,11 +32,6 @@ public class UpDownSandbox {
}
public static void main(String[] args) throws InvocationTargetException, InterruptedException {
SwingUtilities.invokeAndWait(new Runnable() {
@Override
public void run() {
new UpDownSandbox();
}
});
SwingUtilities.invokeAndWait(UpDownSandbox::new);
}
}

View File

@ -57,6 +57,6 @@ public class WavePanelSandbox {
}
public static void main(String[] args) throws InvocationTargetException, InterruptedException {
SwingUtilities.invokeAndWait(() -> new WavePanelSandbox());
SwingUtilities.invokeAndWait(WavePanelSandbox::new);
}
}