mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 06:45:07 +02:00
8344078: Remove security manager dependency in java.nio
Reviewed-by: alanb, rriggs
This commit is contained in:
parent
2649406323
commit
922b12f30c
67 changed files with 285 additions and 1480 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2008, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2008, 2024, 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
|
||||
|
@ -26,8 +26,6 @@
|
|||
package sun.nio.fs;
|
||||
|
||||
import java.nio.file.*;
|
||||
import java.security.AccessController;
|
||||
import java.security.PrivilegedAction;
|
||||
import java.io.IOException;
|
||||
import java.util.*;
|
||||
|
||||
|
@ -54,22 +52,14 @@ abstract class AbstractPoller implements Runnable {
|
|||
/**
|
||||
* Starts the poller thread
|
||||
*/
|
||||
@SuppressWarnings("removal")
|
||||
public void start() {
|
||||
final Runnable thisRunnable = this;
|
||||
AccessController.doPrivileged(new PrivilegedAction<>() {
|
||||
@Override
|
||||
public Object run() {
|
||||
Thread thr = new Thread(null,
|
||||
thisRunnable,
|
||||
"FileSystemWatchService",
|
||||
0,
|
||||
false);
|
||||
thr.setDaemon(true);
|
||||
thr.start();
|
||||
return null;
|
||||
}
|
||||
});
|
||||
Thread thr = new Thread(null,
|
||||
this,
|
||||
"FileSystemWatchService",
|
||||
0,
|
||||
false);
|
||||
thr.setDaemon(true);
|
||||
thr.start();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue