Skip to content

Commit 79d6d21

Browse files
author
Bruce Eckel
committed
Most recent and change to (c)
1 parent 56ec933 commit 79d6d21

File tree

1,055 files changed

+2575
-2085
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,055 files changed

+2575
-2085
lines changed

Ant-Common.xml

Lines changed: 43 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,12 @@
1515
To see options, type: ant -p
1616
</description>
1717

18+
<condition property="version1.8">
19+
<equals arg1="1.8" arg2="${ant.java.version}"/>
20+
</condition>
21+
22+
23+
<!--===========================================================-->
1824
<macrodef name="jrun">
1925
<attribute name="cls" default="NOT SET"/>
2026
<attribute name="dirpath" default=""/>
@@ -46,6 +52,8 @@
4652
</sequential>
4753
</macrodef>
4854

55+
56+
<!--===========================================================-->
4957
<macrodef name="jrunconsole">
5058
<attribute name="cls" default="NOT SET"/>
5159
<attribute name="dirpath" default=""/>
@@ -72,11 +80,10 @@
7280
</sequential>
7381
</macrodef>
7482

75-
<condition property="version1.8">
76-
<equals arg1="1.8" arg2="${ant.java.version}"/>
77-
</condition>
7883

79-
<target name="base">
84+
<!--===========================================================-->
85+
<target name="base"
86+
description="Build all common dependencies">
8087
<javac includeantruntime="false"
8188
classpath="${java.class.path};${basedir};${basedir}/.."
8289
srcdir="${basedir}/../onjava/">
@@ -89,6 +96,12 @@
8996
<compilerarg value="-Xmaxerrs"/>
9097
<compilerarg value="10"/>
9198
</javac>
99+
<javac includeantruntime="false"
100+
classpath="${java.class.path};${basedir};${basedir}/.."
101+
srcdir="${basedir}/../polymorphism/music/">
102+
<compilerarg value="-Xmaxerrs"/>
103+
<compilerarg value="10"/>
104+
</javac>
92105
<javac includeantruntime="false"
93106
classpath="${java.class.path};${basedir};${basedir}/.."
94107
srcdir="${basedir}/../typeinfo/pets/">
@@ -97,28 +110,29 @@
97110
</javac>
98111
<javac includeantruntime="false"
99112
classpath="${java.class.path};${basedir};${basedir}/.."
100-
srcdir="${basedir}/../generics/coffee/">
113+
srcdir="${basedir}/../collections/">
101114
<compilerarg value="-Xmaxerrs"/>
102115
<compilerarg value="10"/>
103116
</javac>
104117
<javac includeantruntime="false"
105118
classpath="${java.class.path};${basedir};${basedir}/.."
106-
srcdir="${basedir}/../enums/menu/">
119+
srcdir="${basedir}/../generics/coffee/">
107120
<compilerarg value="-Xmaxerrs"/>
108121
<compilerarg value="10"/>
109122
</javac>
110123
<javac includeantruntime="false"
111124
classpath="${java.class.path};${basedir};${basedir}/.."
112-
srcdir="${basedir}/../polymorphism/music/">
125+
srcdir="${basedir}/../enums/menu/">
113126
<compilerarg value="-Xmaxerrs"/>
114127
<compilerarg value="10"/>
115128
</javac>
116129
</target>
117130

118-
<target
119-
depends="base"
131+
132+
<!--===========================================================-->
133+
<target name="build"
120134
description="Build all classes in this directory"
121-
name="build">
135+
depends="base">
122136
<fail message="Java 8 required" unless="version1.8"/>
123137
<echo message="Building '${chapter}'&#13;"/>
124138
<echo file="${antoutput}" append="true" message="Building '${chapter}'&#13;"/>
@@ -134,10 +148,11 @@
134148
<echo file="${antoutput}" append="true" message="Build '${chapter}' succeeded&#13;"/>
135149
</target>
136150

137-
<target
138-
depends="base"
151+
152+
<!--===========================================================-->
153+
<target name="buildw"
139154
description="Build all classes in this directory, enabling 'Unchecked' warnings"
140-
name="buildw">
155+
depends="base">
141156
<fail message="Java 8 required" unless="version1.8"/>
142157
<echo message="Building '${chapter}'&#13;"/>
143158
<echo file="${antoutput}" append="true" message="Building '${chapter}'&#13;"/>
@@ -154,10 +169,22 @@
154169
<echo file="${antoutput}" append="true" message="Build '${chapter}' succeeded&#13;"/>
155170
</target>
156171

157-
<target
158-
depends="base"
172+
<!--===========================================================-->
173+
<target name="verifyclean"
174+
description="delete ant verify output files" >
175+
<delete>
176+
<fileset dir="${basedir}" casesensitive="yes">
177+
<include name="**/update_output.bat" />
178+
<include name="**/validate_failures.txt" />
179+
<include name="**/strategies.txt" />
180+
</fileset>
181+
</delete>
182+
<echo message="verifyclean successful"/>
183+
</target>
184+
185+
<target name="verify"
159186
description="Verify output; requires Python 3.5"
160-
name="verify">
187+
depends="verifyclean">
161188
<exec dir="${basedir}" executable="python" failonerror="true">
162189
<arg line="../verify_output.py" />
163190
</exec>

HelloDate.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// HelloDate.java
2-
// ©2016 MindView LLC: see Copyright.txt
2+
// (c)2016 MindView LLC: see Copyright.txt
33
// We make no guarantees that this code is fit for any purpose.
44
// Visit http://mindviewinc.com/Books/OnJava/ for more book information.
55
import java.util.*;

annotations/AtUnitComposition.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// annotations/AtUnitComposition.java
2-
// ©2016 MindView LLC: see Copyright.txt
2+
// (c)2016 MindView LLC: see Copyright.txt
33
// We make no guarantees that this code is fit for any purpose.
44
// Visit http://mindviewinc.com/Books/OnJava/ for more book information.
55
// Creating non-embedded tests.

annotations/AtUnitExample1.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// annotations/AtUnitExample1.java
2-
// ©2016 MindView LLC: see Copyright.txt
2+
// (c)2016 MindView LLC: see Copyright.txt
33
// We make no guarantees that this code is fit for any purpose.
44
// Visit http://mindviewinc.com/Books/OnJava/ for more book information.
55
package annotations;

annotations/AtUnitExample2.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// annotations/AtUnitExample2.java
2-
// ©2016 MindView LLC: see Copyright.txt
2+
// (c)2016 MindView LLC: see Copyright.txt
33
// We make no guarantees that this code is fit for any purpose.
44
// Visit http://mindviewinc.com/Books/OnJava/ for more book information.
55
// Assertions and exceptions can be used in @Tests.

annotations/AtUnitExample3.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// annotations/AtUnitExample3.java
2-
// ©2016 MindView LLC: see Copyright.txt
2+
// (c)2016 MindView LLC: see Copyright.txt
33
// We make no guarantees that this code is fit for any purpose.
44
// Visit http://mindviewinc.com/Books/OnJava/ for more book information.
55
package annotations;

annotations/AtUnitExample4.java

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// annotations/AtUnitExample4.java
2-
// ©2016 MindView LLC: see Copyright.txt
2+
// (c)2016 MindView LLC: see Copyright.txt
33
// We make no guarantees that this code is fit for any purpose.
44
// Visit http://mindviewinc.com/Books/OnJava/ for more book information.
55
package annotations;
@@ -66,16 +66,15 @@ public static void main(String[] args) throws Exception {
6666
annotations.AtUnitExample4
6767
. words 'All'
6868
(failed)
69-
. scramble1 'brontosauruses'
70-
ntsaueorosurbs
71-
(failed)
72-
. scramble2 'are'
73-
are
69+
. scramble2 'brontosauruses'
70+
tsaeborornussu
71+
72+
. scramble1 'are'
73+
rae
7474
(failed)
7575
(3 tests)
7676
77-
>>> 3 FAILURES <<<
77+
>>> 2 FAILURES <<<
7878
annotations.AtUnitExample4: words
7979
annotations.AtUnitExample4: scramble1
80-
annotations.AtUnitExample4: scramble2
8180
*/

annotations/AtUnitExample5.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// annotations/AtUnitExample5.java
2-
// ©2016 MindView LLC: see Copyright.txt
2+
// (c)2016 MindView LLC: see Copyright.txt
33
// We make no guarantees that this code is fit for any purpose.
44
// Visit http://mindviewinc.com/Books/OnJava/ for more book information.
55
package annotations;

annotations/AtUnitExternalTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// annotations/AtUnitExternalTest.java
2-
// ©2016 MindView LLC: see Copyright.txt
2+
// (c)2016 MindView LLC: see Copyright.txt
33
// We make no guarantees that this code is fit for any purpose.
44
// Visit http://mindviewinc.com/Books/OnJava/ for more book information.
55
// Creating non-embedded tests.

annotations/HashSetTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// annotations/HashSetTest.java
2-
// ©2016 MindView LLC: see Copyright.txt
2+
// (c)2016 MindView LLC: see Copyright.txt
33
// We make no guarantees that this code is fit for any purpose.
44
// Visit http://mindviewinc.com/Books/OnJava/ for more book information.
55
package annotations;

0 commit comments

Comments
 (0)