< prev index next >

src/java.base/unix/classes/sun/nio/fs/UnixFileSystem.java

Print this page
@@ -50,11 +50,10 @@
  import java.util.NoSuchElementException;
  import java.util.Objects;
  import java.util.concurrent.ExecutionException;
  import java.util.concurrent.TimeUnit;
  import java.util.regex.Pattern;
- import jdk.internal.misc.Blocker;
  import sun.nio.ch.DirectBuffer;
  import sun.nio.ch.IOStatus;
  import sun.security.action.GetPropertyAction;
  import static sun.nio.fs.UnixConstants.*;
  import static sun.nio.fs.UnixNativeDispatcher.*;

@@ -680,39 +679,33 @@
                  boolean copied = false;
  
                  // Some forms of direct copy do not work on zero size files
                  if (!directCopyNotSupported && attrs.size() > 0) {
                      // copy bytes to target using platform function
-                     long comp = Blocker.begin();
                      try {
                          int res = directCopy(fo, fi, addressToPollForCancel);
                          if (res == 0) {
                              copied = true;
                          } else if (res == IOStatus.UNSUPPORTED) {
                              directCopyNotSupported = true;
                          }
                      } catch (UnixException x) {
                          x.rethrowAsIOException(source, target);
-                     } finally {
-                         Blocker.end(comp);
                      }
                  }
  
                  if (!copied) {
                      // copy bytes to target via a temporary direct buffer
                      int bufferSize = temporaryBufferSize(source, target);
                      ByteBuffer buf =
                          sun.nio.ch.Util.getTemporaryDirectBuffer(bufferSize);
                      try {
-                         long comp = Blocker.begin();
                          try {
                              bufferedCopy(fo, fi, ((DirectBuffer)buf).address(),
                                            bufferSize, addressToPollForCancel);
                          } catch (UnixException x) {
                              x.rethrowAsIOException(source, target);
-                         } finally {
-                             Blocker.end(comp);
                          }
                      } finally {
                          sun.nio.ch.Util.releaseTemporaryDirectBuffer(buf);
                      }
                  }
< prev index next >