Use Objects.requireNonNull().
This commit is contained in:
parent
0cdd866393
commit
14a2171035
6 changed files with 16 additions and 25 deletions
|
|
@ -7,6 +7,7 @@ import org.schabi.newpipe.streams.io.SharpStream;
|
|||
import java.io.File;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.IOException;
|
||||
import java.util.Objects;
|
||||
|
||||
public class CircularFileWriter extends SharpStream {
|
||||
|
||||
|
|
@ -27,9 +28,7 @@ public class CircularFileWriter extends SharpStream {
|
|||
private BufferedFile aux;
|
||||
|
||||
public CircularFileWriter(SharpStream target, File temp, OffsetChecker checker) throws IOException {
|
||||
if (checker == null) {
|
||||
throw new NullPointerException("checker is null");
|
||||
}
|
||||
Objects.requireNonNull(checker);
|
||||
|
||||
if (!temp.exists()) {
|
||||
if (!temp.createNewFile()) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue