Fixes so it runs OK under WSL2

This commit is contained in:
Bruce Eckel 2020-10-07 14:16:29 -06:00
parent 6457a1dee5
commit f07d93d8e5
2 changed files with 5 additions and 3 deletions

View File

@ -2,6 +2,7 @@
// (c)2020 MindView LLC: see Copyright.txt // (c)2020 MindView LLC: see Copyright.txt
// We make no guarantees that this code is fit for any purpose. // We make no guarantees that this code is fit for any purpose.
// Visit http://OnJava8.com for more book information. // Visit http://OnJava8.com for more book information.
// {ExcludeFromGradle} Runs too long under WSL2
import java.util.*; import java.util.*;
import java.nio.*; import java.nio.*;
import java.nio.channels.*; import java.nio.channels.*;

View File

@ -3,8 +3,8 @@
// We make no guarantees that this code is fit for any purpose. // We make no guarantees that this code is fit for any purpose.
// Visit http://OnJava8.com for more book information. // Visit http://OnJava8.com for more book information.
// Demonstration of Observer pattern using // Demonstration of Observer pattern using
// Java's built-in observer classes // Java's built-in observer classes.
// {ExcludeFromTravisCI} // {ExcludeFromGradle} // Won't work under WSL2
import javax.swing.*; import javax.swing.*;
import java.awt.*; import java.awt.*;
import java.awt.event.*; import java.awt.event.*;
@ -33,7 +33,8 @@ public class BoxObserver extends JFrame {
cp.add(new OCBox(x, y, notifier)); cp.add(new OCBox(x, y, notifier));
} }
public static void main(String[] args) { public static void main(String[] args) {
new TimedAbort(4); // For automated test runs:
// new TimedAbort(4);
int grid = 8; int grid = 8;
if(args.length > 0) if(args.length > 0)
grid = Integer.parseInt(args[0]); grid = Integer.parseInt(args[0]);