langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/file/JavacFileManager.java
equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2005, 2016, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. Oracle designates this |
7 * published by the Free Software Foundation. Oracle designates this |
523 /** |
523 /** |
524 * Close the JavaFileManager, releasing resources. |
524 * Close the JavaFileManager, releasing resources. |
525 */ |
525 */ |
526 @Override @DefinedBy(Api.COMPILER) |
526 @Override @DefinedBy(Api.COMPILER) |
527 public void close() throws IOException { |
527 public void close() throws IOException { |
528 for (FileSystem fs: fileSystems.values()) |
528 if (deferredCloseTimeout > 0) { |
|
529 deferredClose(); |
|
530 return; |
|
531 } |
|
532 |
|
533 for (FileSystem fs: fileSystems.values()) { |
529 fs.close(); |
534 fs.close(); |
|
535 } |
|
536 fileSystems.clear(); |
|
537 contentCache.clear(); |
530 } |
538 } |
531 |
539 |
532 @Override @DefinedBy(Api.COMPILER) |
540 @Override @DefinedBy(Api.COMPILER) |
533 public ClassLoader getClassLoader(Location location) { |
541 public ClassLoader getClassLoader(Location location) { |
534 nullCheck(location); |
542 nullCheck(location); |