Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e16b834

Browse files
author
Bruce Eckel
committed
Pulled main out of ProcessFiles.java so it runs on CI
1 parent 0f85a79 commit e16b834

File tree

2 files changed

+43
-30
lines changed

2 files changed

+43
-30
lines changed

annotations/DemoProcessFiles.java

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
// annotations/DemoProcessFiles.java
2+
// (c)2017 MindView LLC: see Copyright.txt
3+
// We make no guarantees that this code is fit for any purpose.
4+
// Visit http://OnJava8.com for more book information.
5+
import onjava.ProcessFiles;
6+
7+
public class DemoProcessFiles {
8+
public static void main(String[] args) {
9+
new ProcessFiles(file -> System.out.println(file),
10+
"java").start(args);
11+
}
12+
}
13+
/* Output:
14+
.\AtUnitExample1.java
15+
.\AtUnitExample2.java
16+
.\AtUnitExample3.java
17+
.\AtUnitExample4.java
18+
.\AtUnitExample5.java
19+
.\AUComposition.java
20+
.\AUExternalTest.java
21+
.\database\Constraints.java
22+
.\database\DBTable.java
23+
.\database\Member.java
24+
.\database\SQLInteger.java
25+
.\database\SQLString.java
26+
.\database\TableCreator.java
27+
.\database\Uniqueness.java
28+
.\DemoProcessFiles.java
29+
.\HashSetTest.java
30+
.\ifx\ExtractInterface.java
31+
.\ifx\IfaceExtractorProcessor.java
32+
.\ifx\Multiplier.java
33+
.\PasswordUtils.java
34+
.\simplest\Simple.java
35+
.\simplest\SimpleProcessor.java
36+
.\simplest\SimpleTest.java
37+
.\SimulatingNull.java
38+
.\StackL.java
39+
.\StackLStringTst.java
40+
.\Testable.java
41+
.\UseCase.java
42+
.\UseCaseTracker.java
43+
*/

onjava/ProcessFiles.java

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
// (c)2017 MindView LLC: see Copyright.txt
33
// We make no guarantees that this code is fit for any purpose.
44
// Visit http://OnJava8.com for more book information.
5-
// {ValidateByHand} // main() won't run on Travis CI
6-
// {java onjava.ProcessFiles}
75
package onjava;
86
import java.io.*;
97
import java.nio.file.*;
@@ -47,32 +45,4 @@ public void start(String[] args) {
4745
.filter(matcher::matches)
4846
.forEach(p -> strategy.process(p.toFile()));
4947
}
50-
// Demonstration of how to use it:
51-
public static void main(String[] args) {
52-
new ProcessFiles(file -> System.out.println(file),
53-
"java").start(args);
54-
}
5548
}
56-
/* Output: (First and Last 10 Lines)
57-
.\ArrayShow.java
58-
.\atunit\AtUnit.java
59-
.\atunit\ClassNameFinder.java
60-
.\atunit\Test.java
61-
.\atunit\TestObjectCleanup.java
62-
.\atunit\TestObjectCreate.java
63-
.\atunit\TestProperty.java
64-
.\BasicSupplier.java
65-
.\CollectionMethodDifferences.java
66-
.\ConvertTo.java
67-
...________...________...________...________...
68-
.\Stack.java
69-
.\Suppliers.java
70-
.\TimedAbort.java
71-
.\Timer.java
72-
.\Tuple.java
73-
.\Tuple2.java
74-
.\Tuple3.java
75-
.\Tuple4.java
76-
.\Tuple5.java
77-
.\TypeCounter.java
78-
*/

0 commit comments

Comments
 (0)