Should work with JDK8 now
This commit is contained in:
parent
7fb818dc24
commit
c7a29b9b47
@ -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
|
||||
|
@ -18,8 +18,7 @@ public class NotAtomic {
|
||||
public NotAtomic();
|
||||
Code:
|
||||
0: aload_0
|
||||
1: invokespecial #1 // Method
|
||||
java/lang/Object."<init>":()V
|
||||
1: invokespecial #1 // Method java/lang/Object."<init>":()V
|
||||
4: return
|
||||
|
||||
void f1();
|
||||
|
@ -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:
|
||||
|
@ -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):
|
||||
|
@ -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
|
||||
|
@ -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);
|
||||
});
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user