diff options
author | Felix Mulder <felix.mulder@gmail.com> | 2016-10-14 08:37:03 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-10-14 08:37:03 +0200 |
commit | 8bfaadaae141e83db7f515b042fcee26ed0e54fd (patch) | |
tree | 26e9773c3c9da3a384895680941399aa1e1e311a /test/test | |
parent | 6095454e05ba4446fca446c5b53e80180d69b127 (diff) | |
parent | ddbbb8350ec210d63b552ee133cf872ff95eaea2 (diff) | |
download | dotty-8bfaadaae141e83db7f515b042fcee26ed0e54fd.tar.gz dotty-8bfaadaae141e83db7f515b042fcee26ed0e54fd.tar.bz2 dotty-8bfaadaae141e83db7f515b042fcee26ed0e54fd.zip |
Merge pull request #1565 from Blaisorblade/warnings
Small fixes to some warnings/comment typos
Diffstat (limited to 'test/test')
-rw-r--r-- | test/test/ContextEscapeDetector.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/test/test/ContextEscapeDetector.java b/test/test/ContextEscapeDetector.java index c7768fd57..78d293a5d 100644 --- a/test/test/ContextEscapeDetector.java +++ b/test/test/ContextEscapeDetector.java @@ -1,6 +1,5 @@ package test; -import org.junit.runner.Description; import org.junit.runner.Result; import org.junit.runner.notification.RunListener; import org.junit.Assert; @@ -43,6 +42,7 @@ public class ContextEscapeDetector extends RunListener { return count; } + @SuppressWarnings("unused") private static volatile Object o = null; private static synchronized void forceGCHeuristic0() { @@ -59,7 +59,7 @@ public class ContextEscapeDetector extends RunListener { private static synchronized void forceGCHeuristic1() { Object obj = new Object(); - WeakReference ref = new WeakReference<Object>(obj); + WeakReference<Object> ref = new WeakReference<>(obj); obj = null; while (ref.get() != null) { System.gc(); @@ -69,7 +69,7 @@ public class ContextEscapeDetector extends RunListener { private static synchronized void forceGCHeuristic2() { try { Object[] arr = new Object[1024]; // upto 8 GB - WeakReference ref = new WeakReference<Object>(arr); + WeakReference<Object> ref = new WeakReference<>(arr); o = arr; // make sure array isn't optimized away Runtime runtime = Runtime.getRuntime(); |