aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Erik Gahlin <egahlin@openjdk.org> 2021-04-16 19:51:15 +0000
committerGravatar Erik Gahlin <egahlin@openjdk.org> 2021-04-16 19:51:15 +0000
commit4413dbfbdb66a572406200dfec67e60e9d679642 (patch)
tree4fcd794d9675b4014172a7a81f2e4cbd435af36e
parent74d03abb7b0eed76187dd1cba3d4f6666e52c750 (diff)
downloadjdk-4413dbfbdb66a572406200dfec67e60e9d679642.tar.gz
jdk-4413dbfbdb66a572406200dfec67e60e9d679642.zip
8263395: Incorrect use of Objects.nonNull
Reviewed-by: shade
-rw-r--r--src/jdk.jfr/share/classes/jdk/jfr/Recording.java4
-rw-r--r--src/jdk.jfr/share/classes/jdk/jfr/consumer/EventStream.java4
-rw-r--r--src/jdk.jfr/share/classes/jdk/jfr/internal/consumer/AbstractEventStream.java4
3 files changed, 6 insertions, 6 deletions
diff --git a/src/jdk.jfr/share/classes/jdk/jfr/Recording.java b/src/jdk.jfr/share/classes/jdk/jfr/Recording.java
index 4be4b4da09b..71ef9cebc25 100644
--- a/src/jdk.jfr/share/classes/jdk/jfr/Recording.java
+++ b/src/jdk.jfr/share/classes/jdk/jfr/Recording.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -436,7 +436,7 @@ public final class Recording implements Closeable {
* @since 14
*/
/*package private*/ void setFlushInterval(Duration interval) {
- Objects.nonNull(interval);
+ Objects.requireNonNull(interval);
if (interval.isNegative()) {
throw new IllegalArgumentException("Stream interval can't be negative");
}
diff --git a/src/jdk.jfr/share/classes/jdk/jfr/consumer/EventStream.java b/src/jdk.jfr/share/classes/jdk/jfr/consumer/EventStream.java
index 83bd2d65f72..079813bfb77 100644
--- a/src/jdk.jfr/share/classes/jdk/jfr/consumer/EventStream.java
+++ b/src/jdk.jfr/share/classes/jdk/jfr/consumer/EventStream.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2019, 2020, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2019, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -159,7 +159,7 @@ public interface EventStream extends AutoCloseable {
* files in the directory.
*/
public static EventStream openRepository(Path directory) throws IOException {
- Objects.nonNull(directory);
+ Objects.requireNonNull(directory);
AccessControlContext acc = AccessController.getContext();
return new EventDirectoryStream(acc, directory, FileAccess.UNPRIVILEGED, null, Collections.emptyList());
}
diff --git a/src/jdk.jfr/share/classes/jdk/jfr/internal/consumer/AbstractEventStream.java b/src/jdk.jfr/share/classes/jdk/jfr/internal/consumer/AbstractEventStream.java
index fac79517449..dfc15b72b8f 100644
--- a/src/jdk.jfr/share/classes/jdk/jfr/internal/consumer/AbstractEventStream.java
+++ b/src/jdk.jfr/share/classes/jdk/jfr/internal/consumer/AbstractEventStream.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2019, 2020, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2019, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -110,7 +110,7 @@ public abstract class AbstractEventStream implements EventStream {
@Override
public final void setStartTime(Instant startTime) {
- Objects.nonNull(startTime);
+ Objects.requireNonNull(startTime);
synchronized (streamConfiguration) {
if (streamConfiguration.started) {
throw new IllegalStateException("Stream is already started");