8246128: JFR: Fix warnings

Reviewed-by: mgronlun
This commit is contained in:
Erik Gahlin 2020-05-29 17:02:11 +02:00
parent 6fd44901ec
commit 984373408e
18 changed files with 2 additions and 42 deletions

View File

@ -26,8 +26,6 @@ package jdk.jfr.internal.dcmd;
import java.io.IOException;
import java.nio.file.InvalidPathException;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.time.Duration;
import java.time.Instant;
import java.time.LocalDate;

View File

@ -26,7 +26,6 @@
package jdk.jfr.api.consumer.recordingstream;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.atomic.AtomicBoolean;
import jdk.jfr.Event;
import jdk.jfr.Name;

View File

@ -31,7 +31,6 @@ import java.io.PrintWriter;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.time.Duration;
import java.time.Instant;
import jdk.jfr.Event;

View File

@ -27,7 +27,6 @@ package jdk.jfr.api.consumer.streaming;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.time.Duration;
import java.time.Instant;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;
@ -36,7 +35,6 @@ import java.util.concurrent.atomic.AtomicReference;
import jdk.jfr.Event;
import jdk.jfr.Name;
import jdk.jfr.Recording;
import jdk.jfr.consumer.EventStream;
import jdk.test.lib.Asserts;
import jdk.test.lib.jfr.StreamingUtils;
@ -99,7 +97,7 @@ public class TestCrossProcessStreaming {
// Consume events until 'exit' signal.
AtomicInteger total = new AtomicInteger();
AtomicInteger produced = new AtomicInteger(-1);
AtomicReference<Exception> exception = new AtomicReference();
AtomicReference<Exception> exception = new AtomicReference<>();
try (EventStream es = EventStream.openRepository(repo)) {
es.onEvent("Batch2", e -> {
try {

View File

@ -28,7 +28,6 @@ package jdk.jfr.api.consumer.streaming;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.time.Duration;
import java.time.Instant;
import java.util.concurrent.CountDownLatch;

View File

@ -25,9 +25,7 @@
package jdk.jfr.api.recording.event;
import java.io.IOException;
import java.time.Duration;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.CountDownLatch;
@ -35,9 +33,6 @@ import jdk.jfr.Event;
import jdk.jfr.FlightRecorder;
import jdk.jfr.Recording;
import jdk.jfr.consumer.RecordedEvent;
import jdk.jfr.consumer.RecordedThread;
import jdk.test.lib.Asserts;
import jdk.test.lib.jfr.EventNames;
import jdk.test.lib.jfr.Events;
/**

View File

@ -24,14 +24,12 @@
package jdk.jfr.event.gc.detailed;
import java.nio.file.Paths;
import java.util.List;
import jdk.jfr.EventType;
import jdk.jfr.FlightRecorder;
import jdk.jfr.Recording;
import jdk.jfr.consumer.RecordedEvent;
import jdk.test.lib.Asserts;
import jdk.test.lib.jfr.EventNames;
import jdk.test.lib.jfr.Events;
import jdk.test.lib.jfr.GCHelper;

View File

@ -24,7 +24,6 @@
package jdk.jfr.event.gc.detailed;
import java.nio.file.Paths;
import java.time.Duration;
import java.util.List;

View File

@ -30,14 +30,11 @@ import java.util.ArrayList;
import java.util.List;
import java.util.StringJoiner;
import jdk.jfr.EventType;
import jdk.jfr.FlightRecorder;
import jdk.jfr.Recording;
import jdk.jfr.consumer.RecordedEvent;
import jdk.test.lib.Platform;
import jdk.test.lib.jfr.EventNames;
import jdk.test.lib.jfr.Events;
import jdk.test.lib.process.ProcessTools;
/**
* @test

View File

@ -24,14 +24,10 @@
*/
package jdk.jfr.event.runtime;
import java.io.IOException;
import java.lang.instrument.ClassDefinition;
import java.lang.instrument.ClassFileTransformer;
import java.lang.instrument.IllegalClassFormatException;
import java.lang.instrument.Instrumentation;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.security.ProtectionDomain;
import java.util.List;
import jdk.jfr.Recording;

View File

@ -24,7 +24,6 @@
*/
package jdk.jfr.event.runtime;
import java.io.IOException;
import java.lang.instrument.ClassFileTransformer;
import java.lang.instrument.IllegalClassFormatException;
import java.lang.instrument.Instrumentation;

View File

@ -29,8 +29,6 @@ import java.util.List;
import java.util.stream.Collectors;
import jdk.jfr.Recording;
import jdk.jfr.consumer.RecordedClass;
import jdk.jfr.consumer.RecordedClassLoader;
import jdk.jfr.consumer.RecordedEvent;
import jdk.test.lib.Asserts;
import jdk.test.lib.jfr.EventNames;

View File

@ -32,7 +32,6 @@ import jdk.test.lib.Asserts;
import jdk.test.lib.jfr.EventNames;
import jdk.test.lib.jfr.Events;
import java.lang.management.ManagementFactory;
import java.time.Duration;
import java.time.Instant;
import java.util.Comparator;

View File

@ -25,10 +25,6 @@
package jdk.jfr.event.runtime;
import static jdk.test.lib.Asserts.assertTrue;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.time.Duration;
import java.time.Instant;
import java.util.List;

View File

@ -25,9 +25,6 @@ package jdk.jfr.event.security;
import java.util.List;
import jdk.jfr.AnnotationElement;
import jdk.jfr.EventType;
import jdk.jfr.FlightRecorder;
import jdk.jfr.Recording;
import jdk.jfr.consumer.RecordedEvent;
import jdk.test.lib.Asserts;

View File

@ -41,10 +41,6 @@
package jdk.jfr.javaagent;
import com.sun.tools.attach.VirtualMachine;
import jdk.jfr.FlightRecorder;
import jdk.jfr.FlightRecorderListener;
import jdk.jfr.Recording;
import jdk.jfr.RecordingState;
public class TestLoadedAgent {

View File

@ -24,7 +24,6 @@
package jdk.test.lib.security;
import java.util.List;
import java.security.Security;
public final class JDKSecurityProperties {
@ -45,7 +44,7 @@ public final class JDKSecurityProperties {
"sun.rmi.registry.registryFilter"
);
public static List getKeys() {
public static List<String> getKeys() {
return jdkProps;
}
}

View File

@ -24,9 +24,7 @@
package jdk.test.lib.security;
import java.io.ByteArrayInputStream;
import java.io.InputStream;
import java.io.IOException;
import java.io.OutputStream;
import javax.net.ssl.KeyManagerFactory;
import javax.net.ssl.SSLContext;
import javax.net.ssl.SSLServerSocket;