Fixed packaging so jmh build works

This commit is contained in:
Bruce Eckel 2017-01-11 09:11:59 -08:00
parent 5ec9f9b901
commit d3ca481bdb
6 changed files with 11 additions and 8 deletions

View File

@ -37,7 +37,8 @@ public class References {
for(int i = 0; i < size; i++) {
sa.add(new SoftReference<>(
new VeryBig("Soft " + i), rq));
System.out.println("Just created: " + sa.getLast());
System.out.println(
"Just created: " + sa.getLast());
checkQueue();
}
LinkedList<WeakReference<VeryBig>> wa =
@ -45,7 +46,8 @@ public class References {
for(int i = 0; i < size; i++) {
wa.add(new WeakReference<>(
new VeryBig("Weak " + i), rq));
System.out.println("Just created: " + wa.getLast());
System.out.println(
"Just created: " + wa.getLast());
checkQueue();
}
SoftReference<VeryBig> s =
@ -58,7 +60,8 @@ public class References {
for(int i = 0; i < size; i++) {
pa.add(new PhantomReference<>(
new VeryBig("Phantom " + i), rq));
System.out.println("Just created: " + pa.getLast());
System.out.println(
"Just created: " + pa.getLast());
checkQueue();
}
}

View File

@ -3,7 +3,7 @@
// We make no guarantees that this code is fit for any purpose.
// Visit http://OnJava8.com for more book information.
// Performance differences between Deques
package understandingcollections.jmh;
package collectiontopics.jmh;
import org.openjdk.jmh.annotations.*;
import java.util.concurrent.TimeUnit;
import java.util.*;

View File

@ -3,7 +3,7 @@
// We make no guarantees that this code is fit for any purpose.
// Visit http://OnJava8.com for more book information.
// Performance differences between Lists
package understandingcollections.jmh;
package collectiontopics.jmh;
import org.openjdk.jmh.annotations.*;
import java.util.*;
import java.util.concurrent.*;

View File

@ -3,7 +3,7 @@
// We make no guarantees that this code is fit for any purpose.
// Visit http://OnJava8.com for more book information.
// Performance differences between Maps
package understandingcollections.jmh;
package collectiontopics.jmh;
import org.openjdk.jmh.annotations.*;
import org.openjdk.jmh.infra.Blackhole;
import java.util.*;

View File

@ -3,7 +3,7 @@
// We make no guarantees that this code is fit for any purpose.
// Visit http://OnJava8.com for more book information.
// Performance differences between Queues
package understandingcollections.jmh;
package collectiontopics.jmh;
import org.openjdk.jmh.annotations.*;
import java.util.*;
import java.util.concurrent.*;

View File

@ -3,7 +3,7 @@
// We make no guarantees that this code is fit for any purpose.
// Visit http://OnJava8.com for more book information.
// Demonstrates performance differences in Sets
package understandingcollections.jmh;
package collectiontopics.jmh;
import org.openjdk.jmh.annotations.*;
import org.openjdk.jmh.infra.Blackhole;
import java.util.*;