8246128: JFR: Fix warnings
Reviewed-by: mgronlun
This commit is contained in:
parent
6fd44901ec
commit
984373408e
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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 {
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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;
|
||||
|
||||
/**
|
||||
|
@ -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;
|
||||
|
@ -24,7 +24,6 @@
|
||||
|
||||
package jdk.jfr.event.gc.detailed;
|
||||
|
||||
import java.nio.file.Paths;
|
||||
import java.time.Duration;
|
||||
import java.util.List;
|
||||
|
||||
|
@ -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
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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 {
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user