src/share/classes/com/sun/tools/javac/file/RegularFileObject.java

changeset 1080
edd7d9bd32dd
parent 581
f2fdd52e4e87
child 2037
36e342dd57e2
     1.1 --- a/src/share/classes/com/sun/tools/javac/file/RegularFileObject.java	Wed Aug 31 15:39:00 2011 -0700
     1.2 +++ b/src/share/classes/com/sun/tools/javac/file/RegularFileObject.java	Mon Sep 12 11:39:08 2011 -0700
     1.3 @@ -1,5 +1,5 @@
     1.4  /*
     1.5 - * Copyright (c) 2005, 2009, Oracle and/or its affiliates. All rights reserved.
     1.6 + * Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved.
     1.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     1.8   *
     1.9   * This code is free software; you can redistribute it and/or modify it
    1.10 @@ -98,6 +98,7 @@
    1.11  
    1.12      @Override
    1.13      public OutputStream openOutputStream() throws IOException {
    1.14 +        fileManager.flushCache(this);
    1.15          ensureParentDirectoriesExist();
    1.16          return new FileOutputStream(file);
    1.17      }
    1.18 @@ -128,6 +129,7 @@
    1.19  
    1.20      @Override
    1.21      public Writer openWriter() throws IOException {
    1.22 +        fileManager.flushCache(this);
    1.23          ensureParentDirectoriesExist();
    1.24          return new OutputStreamWriter(new FileOutputStream(file), fileManager.getEncodingName());
    1.25      }

mercurial