src/java.base/share/classes/java/io/FileOutputStream.java
changeset 47460 b6d959fae9ef
parent 47235 9ef10c6e67b8
child 48224 be0df5ab3093
equal deleted inserted replaced
47459:a6e591e12f12 47460:b6d959fae9ef
   408         FileChannel fc = this.channel;
   408         FileChannel fc = this.channel;
   409         if (fc == null) {
   409         if (fc == null) {
   410             synchronized (this) {
   410             synchronized (this) {
   411                 fc = this.channel;
   411                 fc = this.channel;
   412                 if (fc == null) {
   412                 if (fc == null) {
   413                     this.channel = fc = FileChannelImpl.open(fd, path, false, true, this);
   413                     this.channel = fc = FileChannelImpl.open(fd, path, false,
       
   414                         true, false, this);
   414                     if (closed) {
   415                     if (closed) {
   415                         try {
   416                         try {
   416                             // possible race with close(), benign since
   417                             // possible race with close(), benign since
   417                             // FileChannel.close is final and idempotent
   418                             // FileChannel.close is final and idempotent
   418                             fc.close();
   419                             fc.close();