< prev index next >

src/java.base/share/classes/java/io/FileOutputStream.java

Print this page
*** 458,12 ***
          FileChannel fc = this.channel;
          if (fc == null) {
              synchronized (this) {
                  fc = this.channel;
                  if (fc == null) {
!                     this.channel = fc = FileChannelImpl.open(fd, path, false,
!                         true, false, this);
                      if (closed) {
                          try {
                              // possible race with close(), benign since
                              // FileChannel.close is final and idempotent
                              fc.close();
--- 458,12 ---
          FileChannel fc = this.channel;
          if (fc == null) {
              synchronized (this) {
                  fc = this.channel;
                  if (fc == null) {
!                     fc = FileChannelImpl.open(fd, path, false, true, false, false, this);
!                     this.channel = fc;
                      if (closed) {
                          try {
                              // possible race with close(), benign since
                              // FileChannel.close is final and idempotent
                              fc.close();
< prev index next >