Skip to content

Commit c7a29b9

Browse files
committed
Should work with JDK8 now
1 parent 7fb818d commit c7a29b9

File tree

6 files changed

+8
-9
lines changed

6 files changed

+8
-9
lines changed

Copyright.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// Copyright.txt
2-
This computer source code is Copyright �2017 MindView LLC.
2+
This computer source code is Copyright �2020 MindView LLC.
33
All Rights Reserved.
44

55
Permission to use, copy, modify, and distribute this

lowlevel/NotAtomic.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,7 @@ public class NotAtomic {
1818
public NotAtomic();
1919
Code:
2020
0: aload_0
21-
1: invokespecial #1 // Method
22-
java/lang/Object."<init>":()V
21+
1: invokespecial #1 // Method java/lang/Object."<init>":()V
2322
4: return
2423
2524
void f1();

patterns/SingletonPattern.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ interface Resource {
88
void setValue(int x);
99
}
1010

11-
// Since this isn't inherited from a Cloneable
12-
// base class and cloneability isn't added,
11+
// This isn't inherited from a Cloneable
12+
// base class and cloneability isn't added so
1313
// making it final prevents cloneability from
1414
// being added through inheritance. This also
1515
// implements thread-safe lazy initialization:

staticchecking/NoBasePetSpeak.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
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-
# Speaking pets without base classes
5+
#- Speaking pets without base classes
66

77
class Cat:
88
def speak(self):

staticchecking/PetSpeak.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
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-
# Speaking pets in Python
5+
#- Speaking pets in Python
66

77
class Pet:
88
def speak(self): pass

validating/tests/StringInverterTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ void basicInversion1() {
2222
}
2323
@Test
2424
void basicInversion2() {
25-
expectThrows(Error.class, () -> {
25+
assertThrows(Error.class, () -> {
2626
assertEquals(inverter.invert("X"), "X");
2727
});
2828
}
@@ -52,7 +52,7 @@ void allowedCharacters() {
5252
void lengthNoGreaterThan30() {
5353
String str = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx";
5454
assertTrue(str.length() > 30);
55-
expectThrows(RuntimeException.class, () -> {
55+
assertThrows(RuntimeException.class, () -> {
5656
inverter.invert(str);
5757
});
5858
}

0 commit comments

Comments
 (0)