diff --git a/Copyright.txt b/Copyright.txt index 8cc3bb56..f0d35035 100644 --- a/Copyright.txt +++ b/Copyright.txt @@ -1,5 +1,5 @@ // Copyright.txt -This computer source code is Copyright ©2017 MindView LLC. +This computer source code is Copyright ©2020 MindView LLC. All Rights Reserved. Permission to use, copy, modify, and distribute this diff --git a/lowlevel/NotAtomic.java b/lowlevel/NotAtomic.java index f77eb128..e3fa4784 100644 --- a/lowlevel/NotAtomic.java +++ b/lowlevel/NotAtomic.java @@ -18,8 +18,7 @@ public class NotAtomic { public NotAtomic(); Code: 0: aload_0 - 1: invokespecial #1 // Method -java/lang/Object."":()V + 1: invokespecial #1 // Method java/lang/Object."":()V 4: return void f1(); diff --git a/patterns/SingletonPattern.java b/patterns/SingletonPattern.java index f2e46e30..0e466a76 100644 --- a/patterns/SingletonPattern.java +++ b/patterns/SingletonPattern.java @@ -8,8 +8,8 @@ interface Resource { void setValue(int x); } -// Since this isn't inherited from a Cloneable -// base class and cloneability isn't added, +// This isn't inherited from a Cloneable +// base class and cloneability isn't added so // making it final prevents cloneability from // being added through inheritance. This also // implements thread-safe lazy initialization: diff --git a/staticchecking/NoBasePetSpeak.py b/staticchecking/NoBasePetSpeak.py index e148614d..80c771c5 100644 --- a/staticchecking/NoBasePetSpeak.py +++ b/staticchecking/NoBasePetSpeak.py @@ -2,7 +2,7 @@ # (c)2017 MindView LLC: see Copyright.txt # We make no guarantees that this code is fit for any purpose. # Visit http://OnJava8.com for more book information. -# Speaking pets without base classes +#- Speaking pets without base classes class Cat: def speak(self): diff --git a/staticchecking/PetSpeak.py b/staticchecking/PetSpeak.py index 57a05bd6..998a678e 100644 --- a/staticchecking/PetSpeak.py +++ b/staticchecking/PetSpeak.py @@ -2,7 +2,7 @@ # (c)2017 MindView LLC: see Copyright.txt # We make no guarantees that this code is fit for any purpose. # Visit http://OnJava8.com for more book information. -# Speaking pets in Python +#- Speaking pets in Python class Pet: def speak(self): pass diff --git a/validating/tests/StringInverterTests.java b/validating/tests/StringInverterTests.java index 14251217..81725373 100644 --- a/validating/tests/StringInverterTests.java +++ b/validating/tests/StringInverterTests.java @@ -22,7 +22,7 @@ public class StringInverterTests { } @Test void basicInversion2() { - expectThrows(Error.class, () -> { + assertThrows(Error.class, () -> { assertEquals(inverter.invert("X"), "X"); }); } @@ -52,7 +52,7 @@ public class StringInverterTests { void lengthNoGreaterThan30() { String str = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"; assertTrue(str.length() > 30); - expectThrows(RuntimeException.class, () -> { + assertThrows(RuntimeException.class, () -> { inverter.invert(str); }); }