mirror of
https://github.com/openjdk/jdk.git
synced 2026-04-09 14:38:42 +00:00
8263395: Incorrect use of Objects.nonNull
Reviewed-by: shade
This commit is contained in:
parent
74d03abb7b
commit
4413dbfbdb
@ -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");
|
||||
}
|
||||
|
||||
@ -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());
|
||||
}
|
||||
|
||||
@ -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");
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user