Skip to content
This repository was archived by the owner on Jan 18, 2024. It is now read-only.

Commit c651b13

Browse files
committed
Renamed and formatted IOUtilsNoAWTThreadsTest
1 parent 8c356d9 commit c651b13

File tree

1 file changed

+12
-15
lines changed

1 file changed

+12
-15
lines changed

src/test/java/xdev/io/IOUtils2Test.java renamed to src/test/java/xdev/io/IOUtilsNoAWTThreadsTest.java

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -38,33 +38,30 @@
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
}

0 commit comments

Comments
 (0)