This repository was archived by the owner on Jan 18, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +12
-15
lines changed Expand file tree Collapse file tree 1 file changed +12
-15
lines changed Original file line number Diff line number Diff line change 3838 *
3939 * @author XDEV Software (CF)
4040 */
41- public class IOUtils2Test
41+ public class IOUtilsNoAWTThreadsTest
4242{
43-
4443 @ Test
4544 public void noUIThread ()
4645 {
47-
48-
49- int awtThreadsBefore = runnigAWTThreads ().size ();
46+ final int awtThreadsBefore = this .runnigAWTThreads ().size ();
5047
5148 IOUtils .getOS ();
5249
53- int awtThreadsAfter = runnigAWTThreads ().size ();
50+ final int awtThreadsAfter = this . runnigAWTThreads ().size ();
5451
5552 Assert .assertEquals (0 , awtThreadsBefore );
5653 Assert .assertEquals (0 , awtThreadsAfter );
57-
58-
5954 }
6055
61- private Set <Thread > runnigAWTThreads (){
62- Set <Thread > threadSet = new HashSet <>(Thread .getAllStackTraces ().keySet ());
63- return threadSet .stream ().
64- filter (t -> t .getName ().startsWith ("AWT" )).
65- collect (Collectors .toSet ());
66-
67-
56+ private Set <Thread > runnigAWTThreads ()
57+ {
58+ // @formatter:off
59+ return Thread .getAllStackTraces ()
60+ .keySet ()
61+ .stream ()
62+ .filter (t -> t .getName ().startsWith ("AWT" ))
63+ .collect (Collectors .toSet ());
64+ // @formatter:on
6865 }
6966
7067}
You can’t perform that action at this time.
0 commit comments