1 19 20 package org.netbeans.modules.versioning.system.cvss; 21 22 import org.netbeans.modules.versioning.util.ListenersSupport; 23 import org.netbeans.modules.versioning.util.VersioningListener; 24 import org.netbeans.modules.versioning.util.FlatFolder; 25 import org.netbeans.modules.versioning.system.cvss.util.Utils; 26 import org.netbeans.modules.versioning.system.cvss.util.Context; 27 import org.netbeans.modules.turbo.Turbo; 28 import org.netbeans.modules.turbo.CustomProviders; 29 import org.netbeans.lib.cvsclient.admin.Entry; 30 import org.openide.filesystems.FileUtil; 31 import org.openide.ErrorManager; 32 33 import java.io.*; 34 import java.util.*; 35 36 41 public class FileStatusCache { 42 43 50 public static final Object EVENT_FILE_STATUS_CHANGED = new Object (); 51 52 55 private static final Map<File, FileInformation> NOT_MANAGED_MAP = new NotManagedMap(); 56 57 private static final int STATUS_MISSING = 58 FileInformation.STATUS_VERSIONED_NEWINREPOSITORY | 59 FileInformation.STATUS_VERSIONED_DELETEDLOCALLY | 60 FileInformation.STATUS_VERSIONED_REMOVEDLOCALLY; 61 62 public static final int REPOSITORY_STATUS_UNKNOWN = 0; 63 public static final int REPOSITORY_STATUS_UPDATED = 'U'; 64 public static final int REPOSITORY_STATUS_PATCHED = 'P'; 65 public static final int REPOSITORY_STATUS_MODIFIED = 'M'; 66 public static final int REPOSITORY_STATUS_CONFLICT = 'C'; 67 public static final int REPOSITORY_STATUS_MERGEABLE = 'G'; 68 public static final int REPOSITORY_STATUS_REMOVED = 'R'; 69 public static final int REPOSITORY_STATUS_REMOVED_REMOTELY = 'Y'; 70 public static final int REPOSITORY_STATUS_UPTODATE = 65536; 71 72 private static final FileInformation FILE_INFORMATION_EXCLUDED = new FileInformation(FileInformation.STATUS_NOTVERSIONED_EXCLUDED, false); 75 private static final FileInformation FILE_INFORMATION_EXCLUDED_DIRECTORY = new FileInformation(FileInformation.STATUS_NOTVERSIONED_EXCLUDED, true); 76 private static final FileInformation FILE_INFORMATION_UPTODATE_DIRECTORY = new FileInformation(FileInformation.STATUS_VERSIONED_UPTODATE, true); 77 private static final FileInformation FILE_INFORMATION_NOTMANAGED = new FileInformation(FileInformation.STATUS_NOTVERSIONED_NOTMANAGED, false); 78 private static final FileInformation FILE_INFORMATION_NOTMANAGED_DIRECTORY = new FileInformation(FileInformation.STATUS_NOTVERSIONED_NOTMANAGED, true); 79 private static final FileInformation FILE_INFORMATION_UNKNOWN = new FileInformation(FileInformation.STATUS_UNKNOWN, false); 80 81 private final CvsVersioningSystem cvs; 82 private final CvsLiteAdminHandler sah; 83 84 93 94 private final Turbo turbo; 95 96 102 private final String FILE_STATUS_MAP = DiskMapTurboProvider.ATTR_STATUS_MAP; 103 104 private DiskMapTurboProvider cacheProvider; 105 106 FileStatusCache(CvsVersioningSystem cvsVersioningSystem) { 107 this.cvs = cvsVersioningSystem; 108 sah = (CvsLiteAdminHandler) cvs.getAdminHandler(); 109 110 cacheProvider = new DiskMapTurboProvider(); 111 turbo = Turbo.createCustom(new CustomProviders() { 112 private final Set providers = Collections.singleton(cacheProvider); 113 public Iterator providers() { 114 return providers.iterator(); 115 } 116 }, 200, 5000); 117 } 118 119 121 130 private File [] listFiles(File dir) { 131 Set<File> files = getScannedFiles(dir).keySet(); 132 return (File[]) files.toArray(new File[files.size()]); 133 } 134 135 144 public File [] listFiles(Context context, int includeStatus) { 145 Set<File> set = new HashSet<File>(); 146 Map allFiles = cacheProvider.getAllModifiedValues(); 147 for (Iterator i = allFiles.keySet().iterator(); i.hasNext();) { 148 File file = (File) i.next(); 149 FileInformation info = (FileInformation) allFiles.get(file); 150 if (info.isDirectory() || (info.getStatus() & includeStatus) == 0) continue; 151 File [] roots = context.getRootFiles(); 152 for (int j = 0; j < roots.length; j++) { 153 File root = roots[j]; 154 if (root instanceof FlatFolder) { 155 if (file.getParentFile().equals(root)) { 156 set.add(file); 157 break; 158 } 159 } else { 160 if (Utils.isParentOrEqual(root, file)) { 161 set.add(file); 162 break; 163 } 164 } 165 } 166 } 167 if (context.getExclusions().size() > 0) { 168 for (Iterator i = context.getExclusions().iterator(); i.hasNext();) { 169 File excluded = (File) i.next(); 170 for (Iterator j = set.iterator(); j.hasNext();) { 171 File file = (File) j.next(); 172 if (Utils.isParentOrEqual(excluded, file)) { 173 j.remove(); 174 } 175 } 176 } 177 } 178 return (File[]) set.toArray(new File[set.size()]); 179 } 180 181 188 public FileInformation getStatus(File file) { 189 if (file.getName().equals(CvsVersioningSystem.FILENAME_CVS)) return FILE_INFORMATION_NOTMANAGED_DIRECTORY; 190 File dir = file.getParentFile(); 191 if (dir == null) { 192 return FILE_INFORMATION_NOTMANAGED; } 194 Map files = getScannedFiles(dir); 195 if (files == NOT_MANAGED_MAP) return FILE_INFORMATION_NOTMANAGED; 196 FileInformation fi = (FileInformation) files.get(file); 197 if (fi != null) { 198 return fi; 199 } 200 if (!exists(file)) return FILE_INFORMATION_UNKNOWN; 201 if (file.isDirectory()) { 202 return refresh(file, REPOSITORY_STATUS_UNKNOWN); 203 } else { 204 return new FileInformation(FileInformation.STATUS_VERSIONED_UPTODATE, false); 205 } 206 } 207 208 216 public FileInformation refresh(File file, int repositoryStatus, boolean forceChangeEvent) { 217 File dir = file.getParentFile(); 218 if (dir == null) { 219 return FILE_INFORMATION_NOTMANAGED; } 221 Map<File, FileInformation> files = getScannedFiles(dir); 222 if (files == NOT_MANAGED_MAP) return FILE_INFORMATION_NOTMANAGED; 223 FileInformation current = (FileInformation) files.get(file); 224 Entry entry = null; 225 try { 226 entry = cvs.getAdminHandler().getEntry(file); 227 } catch (IOException e) { 228 ErrorManager.getDefault().notify(ErrorManager.INFORMATIONAL, e); 230 } 231 FileInformation fi = createFileInformation(file, entry, repositoryStatus); 232 if (equivalent(fi, current)) { 233 if (forceChangeEvent) fireFileStatusChanged(file, current, fi); 234 return fi; 235 } 236 if (current == null && !fi.isDirectory() && fi.getStatus() == FileInformation.STATUS_VERSIONED_UPTODATE) { 238 if (forceChangeEvent) fireFileStatusChanged(file, current, fi); 239 return fi; 240 } 241 242 file = FileUtil.normalizeFile(file); 243 dir = FileUtil.normalizeFile(dir); 244 Map<File, FileInformation> newFiles = new HashMap<File, FileInformation>(files); 245 if (fi.getStatus() == FileInformation.STATUS_UNKNOWN) { 246 newFiles.remove(file); 247 turbo.writeEntry(file, FILE_STATUS_MAP, null); } 249 else if (fi.getStatus() == FileInformation.STATUS_VERSIONED_UPTODATE && file.isFile()) { 250 newFiles.remove(file); 251 } else { 252 newFiles.put(file, fi); 253 } 254 turbo.writeEntry(dir, FILE_STATUS_MAP, newFiles.size() == 0 ? null : newFiles); 255 256 if (file.isDirectory() && needRecursiveRefresh(fi, current)) { 257 File [] content = listFiles(file); 258 for (int i = 0; i < content.length; i++) { 259 refresh(content[i], REPOSITORY_STATUS_UNKNOWN); 260 } 261 } 262 fireFileStatusChanged(file, current, fi); 263 return fi; 264 } 265 266 273 public FileInformation refresh(File file, int repositoryStatus) { 274 return refresh(file, repositoryStatus, false); 275 } 276 277 283 FileInformation createFileInformation(File file) { 284 Entry entry = null; 285 try { 286 entry = cvs.getAdminHandler().getEntry(file); 287 } catch (IOException e) { 288 ErrorManager.getDefault().notify(ErrorManager.INFORMATIONAL, e); 290 } 291 return createFileInformation(file, entry, REPOSITORY_STATUS_UNKNOWN); 292 } 293 294 301 private static boolean equivalent(FileInformation main, FileInformation other) { 302 if (other == null || main.getStatus() != other.getStatus() || main.isDirectory() != other.isDirectory()) return false; 303 Entry e1 = main.getEntry(null); 304 Entry e2 = other.getEntry(null); 305 return e1 == e2 || e1 == null || e2 == null || equal(e1, e2); 306 } 307 308 315 private static boolean equal(Entry e1, Entry e2) { 316 if (!e1.getRevision().equals(e2.getRevision())) return false; 317 return e1.getStickyInformation() == e2.getStickyInformation() || 318 e1.getStickyInformation() != null && e1.getStickyInformation().equals(e2.getStickyInformation()); 319 } 320 321 private boolean needRecursiveRefresh(FileInformation fi, FileInformation current) { 322 if (fi.getStatus() == FileInformation.STATUS_NOTVERSIONED_EXCLUDED || 323 current != null && current.getStatus() == FileInformation.STATUS_NOTVERSIONED_EXCLUDED) return true; 324 if (fi.getStatus() == FileInformation.STATUS_NOTVERSIONED_NOTMANAGED || 325 current != null && current.getStatus() == FileInformation.STATUS_NOTVERSIONED_NOTMANAGED) return true; 326 return false; 327 } 328 329 336 public void refreshCached(File file, int repositoryStatus) { 337 refresh(file, repositoryStatus); 338 } 339 340 346 public void clearVirtualDirectoryContents(File dir, boolean recursive, File [] exclusions) { 347 Map<File, FileInformation> files = (Map<File, FileInformation>) turbo.readEntry(dir, FILE_STATUS_MAP); 348 if (files == null) { 349 return; 350 } 351 Set<File> set = new HashSet<File>(files.keySet()); 352 Map<File, FileInformation> newMap = null; 353 outter: for (Iterator i = set.iterator(); i.hasNext();) { 354 File file = (File) i.next(); 355 if (exclusions != null) { 356 for (int j = 0; j < exclusions.length; j++) { 357 if (Utils.isParentOrEqual(exclusions[j], file)) continue outter; 358 } 359 } 360 if (recursive && file.isDirectory()) { 361 clearVirtualDirectoryContents(file, true, exclusions); 362 } 363 FileInformation fi = refresh(file, REPOSITORY_STATUS_UNKNOWN); 364 if ((fi.getStatus() & STATUS_MISSING) != 0) { 365 if (newMap == null) newMap = new HashMap<File, FileInformation>(files); 366 newMap.remove(file); 367 } 368 } 369 if (newMap != null) { 370 dir = FileUtil.normalizeFile(dir); 371 turbo.writeEntry(dir, FILE_STATUS_MAP, newMap); 372 } 373 } 374 375 377 Map<File, FileInformation> getAllModifiedFiles() { 378 return cacheProvider.getAllModifiedValues(); 379 } 380 381 386 void directoryContentChanged(File dir) { 387 Map originalFiles = (Map) turbo.readEntry(dir, FILE_STATUS_MAP); 388 if (originalFiles != null) { 389 for (Iterator i = originalFiles.keySet().iterator(); i.hasNext();) { 390 File file = (File) i.next(); 391 refresh(file, REPOSITORY_STATUS_UNKNOWN); 392 } 393 } 394 } 395 396 399 void cleanUp() { 400 long t0 = System.currentTimeMillis(); 401 Map files = cacheProvider.getAllModifiedValues(); 402 for (Iterator i = files.keySet().iterator(); i.hasNext();) { 403 File file = (File) i.next(); 404 FileInformation info = (FileInformation) files.get(file); 405 if ((info.getStatus() & FileInformation.STATUS_LOCAL_CHANGE) != 0) { 406 refresh(file, REPOSITORY_STATUS_UNKNOWN); 407 } else if (info.getStatus() == FileInformation.STATUS_NOTVERSIONED_EXCLUDED) { 408 if (!exists(file)) { 411 refresh(file, REPOSITORY_STATUS_UNKNOWN); 412 } 413 } 414 if (System.currentTimeMillis() - t0 > 15000) break; } 416 } 417 418 420 private Map<File, FileInformation> getScannedFiles(File dir) { 421 Map<File, FileInformation> files; 422 if (dir.getName().equals(CvsVersioningSystem.FILENAME_CVS)) return NOT_MANAGED_MAP; 423 files = (Map<File, FileInformation>) turbo.readEntry(dir, FILE_STATUS_MAP); 424 if (files != null) return files; 425 if (!dir.exists()) { 426 return NOT_MANAGED_MAP; 427 } 428 429 431 dir = FileUtil.normalizeFile(dir); 432 files = scanFolder(dir); turbo.writeEntry(dir, FILE_STATUS_MAP, files); 434 for (Iterator i = files.keySet().iterator(); i.hasNext();) { 435 File file = (File) i.next(); 436 FileInformation info = (FileInformation) files.get(file); 437 if ((info.getStatus() & FileInformation.STATUS_LOCAL_CHANGE) != 0) fireFileStatusChanged(file, null, info); 438 } 439 return files; 440 } 441 442 448 private Map<File, FileInformation> scanFolder(File dir) { 449 File [] files = dir.listFiles(); 450 if (files == null) files = new File[0]; 451 Map<File, FileInformation> folderFiles = new HashMap<File, FileInformation>(files.length); 452 453 Entry [] entries = null; 454 try { 455 entries = sah.getEntriesAsArray(dir); 456 } catch (IOException e) { 457 } 459 460 for (int i = 0; i < files.length; i++) { 461 File file = files[i]; 462 String filename = file.getName(); 463 if (filename.equals(CvsVersioningSystem.FILENAME_CVS)) continue; 464 Entry entry = getEntry(dir, entries, file); 465 FileInformation fi = createFileInformation(file, entry, REPOSITORY_STATUS_UNKNOWN); 466 if (fi.isDirectory() || fi.getStatus() != FileInformation.STATUS_VERSIONED_UPTODATE) { 468 folderFiles.put(file, fi); 469 } 470 } 471 472 if (entries != null) { 473 outter : for (int i = 0; i < entries.length; i++) { 474 Entry entry = entries[i]; 475 File entryFile = new File(dir, entry.getName()); 476 for (int j = 0; j < files.length; j++) { 477 File file = files[j]; 478 if (entryFile.equals(file)) { 479 continue outter; 480 } 481 } 482 FileInformation fi = createFileInformation(entryFile, entry, REPOSITORY_STATUS_UNKNOWN); 483 folderFiles.put(entryFile, fi); 484 } 485 } 486 return folderFiles; 487 } 488 489 496 private Entry getEntry(File dir, Entry[] entries, File file) { 497 if (entries != null) { 498 for (int i = 0; i < entries.length; i++) { 499 Entry entry = entries[i]; 500 File entryFile = new File(dir, entry.getName()); 501 if (file.equals(entryFile)) return entry; 502 } 503 } 504 return null; 505 } 506 507 515 private FileInformation createFileInformation(File file, Entry entry, int repositoryStatus) { 516 if (entry == null) { 517 if (!cvs.isManaged(file)) { 518 if (file.exists()) { 519 return file.isDirectory() ? FILE_INFORMATION_NOTMANAGED_DIRECTORY : FILE_INFORMATION_NOTMANAGED; 520 } else { 521 return FILE_INFORMATION_UNKNOWN; 522 } 523 } 524 return createMissingEntryFileInformation(file, repositoryStatus); 525 } else { 526 return createVersionedFileInformation(entry, file, repositoryStatus); 527 } 528 } 529 530 538 private FileInformation createVersionedFileInformation(Entry entry, File file, int repositoryStatus) { 539 if (entry.isDirectory()) { 540 if (file.exists()) { 541 if (new File(file, CvsVersioningSystem.FILENAME_CVS).isDirectory()) { 542 return FILE_INFORMATION_UPTODATE_DIRECTORY; 543 } else { 544 return new FileInformation(FileInformation.STATUS_NOTVERSIONED_NEWLOCALLY, true); 545 } 546 } else { 547 return new FileInformation(FileInformation.STATUS_VERSIONED_DELETEDLOCALLY, true); 548 } 549 } 550 if (entry.isNewUserFile()) { 551 return new FileInformation(FileInformation.STATUS_VERSIONED_ADDEDLOCALLY, entry, false); 552 } else if (entry.isUserFileToBeRemoved()) { 553 return new FileInformation(FileInformation.STATUS_VERSIONED_REMOVEDLOCALLY, entry, false); 554 } else { 555 if (!exists(file)) { 556 return new FileInformation(FileInformation.STATUS_VERSIONED_DELETEDLOCALLY, entry, false); 557 } 558 if (repositoryStatus == REPOSITORY_STATUS_UPTODATE) { 559 if (!entryTimestampMatches(entry, file)) { 560 entry.setConflict(Entry.getLastModifiedDateFormatter().format(new Date(file.lastModified()))); 561 try { 562 sah.setEntry(file, entry); 563 } catch (IOException e) { 564 ErrorManager.getDefault().notify(e); 565 } 566 } 567 return new FileInformation(FileInformation.STATUS_VERSIONED_UPTODATE, entry, false); 568 } else if (repositoryStatus == REPOSITORY_STATUS_UPDATED || repositoryStatus == REPOSITORY_STATUS_PATCHED) { 569 return new FileInformation(FileInformation.STATUS_VERSIONED_MODIFIEDINREPOSITORY, entry, false); 570 } else if (repositoryStatus == REPOSITORY_STATUS_MODIFIED) { 571 FileInformation fi = new FileInformation(FileInformation.STATUS_VERSIONED_MODIFIEDLOCALLY, entry, false); 572 return fi; 573 } else if (repositoryStatus == REPOSITORY_STATUS_CONFLICT) { 574 if (isLocalConflict(entry, file)) { 575 return new FileInformation(FileInformation.STATUS_VERSIONED_CONFLICT, entry, false); 576 } else { 577 return new FileInformation(FileInformation.STATUS_VERSIONED_MERGE, entry, false); 578 } 579 } else if (repositoryStatus == REPOSITORY_STATUS_MERGEABLE) { 580 return new FileInformation(FileInformation.STATUS_VERSIONED_MERGE, entry, false); 581 } else if (repositoryStatus == REPOSITORY_STATUS_REMOVED_REMOTELY) { 582 return new FileInformation(FileInformation.STATUS_VERSIONED_REMOVEDINREPOSITORY, entry, false); 583 } else if (repositoryStatus == REPOSITORY_STATUS_UNKNOWN || repositoryStatus == '?') { 584 if (exists(file)) { 585 if (isLocalConflict(entry, file)) { 586 return new FileInformation(FileInformation.STATUS_VERSIONED_CONFLICT, entry, false); 587 } else if (entryTimestampMatches(entry, file)) { 588 return new FileInformation(FileInformation.STATUS_VERSIONED_UPTODATE, entry, false); 589 } else { 590 FileInformation fi = new FileInformation(FileInformation.STATUS_VERSIONED_MODIFIEDLOCALLY, entry, false); 591 return fi; 592 } 593 } else { 594 return new FileInformation(FileInformation.STATUS_VERSIONED_DELETEDLOCALLY, entry, false); 595 } 596 } 597 } 598 throw new IllegalArgumentException ("Unknown repository status: " + (char)repositoryStatus); } 600 601 private boolean isLocalConflict(Entry entry, File file) { 602 return exists(file) && entry.hadConflicts() && entryTimestampMatches(entry, file); 603 } 604 605 612 private FileInformation createMissingEntryFileInformation(File file, int repositoryStatus) { 613 boolean isDirectory = file.isDirectory(); 614 int parentStatus = getStatus(file.getParentFile()).getStatus(); 615 if (parentStatus == FileInformation.STATUS_NOTVERSIONED_EXCLUDED) { 616 return isDirectory ? FILE_INFORMATION_EXCLUDED_DIRECTORY : FILE_INFORMATION_EXCLUDED; 617 } 618 if (parentStatus == FileInformation.STATUS_NOTVERSIONED_NOTMANAGED) { 619 if (isDirectory) { 620 return isInsideCvsMetadata(file) ? FILE_INFORMATION_NOTMANAGED_DIRECTORY : FILE_INFORMATION_UPTODATE_DIRECTORY; 622 } else { 623 return FILE_INFORMATION_NOTMANAGED; 624 } 625 } 626 if (repositoryStatus == REPOSITORY_STATUS_UNKNOWN || repositoryStatus == '?') { 627 if (exists(file)) { 628 if (cvs.isIgnored(file)) { 629 return isDirectory ? FILE_INFORMATION_EXCLUDED_DIRECTORY : FILE_INFORMATION_EXCLUDED; 630 } 631 return new FileInformation(FileInformation.STATUS_NOTVERSIONED_NEWLOCALLY, isDirectory); 632 } else { 633 return new FileInformation(FileInformation.STATUS_UNKNOWN, false); 634 } 635 } else if (repositoryStatus == REPOSITORY_STATUS_UPDATED) { 636 if (file.exists()) { 637 return new FileInformation(FileInformation.STATUS_VERSIONED_CONFLICT, isDirectory); 639 } else { 640 return new FileInformation(FileInformation.STATUS_VERSIONED_NEWINREPOSITORY, isDirectory); 641 } 642 } else if (repositoryStatus == REPOSITORY_STATUS_UPTODATE) { 643 if (parentStatus == FileInformation.STATUS_NOTVERSIONED_NEWLOCALLY) { 644 return new FileInformation(FileInformation.STATUS_NOTVERSIONED_NEWLOCALLY, isDirectory); 645 } else { 646 return new FileInformation(FileInformation.STATUS_NOTVERSIONED_EXCLUDED, isDirectory); 648 } 649 } else if (repositoryStatus == REPOSITORY_STATUS_REMOVED_REMOTELY) { 650 if (exists(file)) { 651 return new FileInformation(FileInformation.STATUS_NOTVERSIONED_NEWLOCALLY, isDirectory); 652 } else { 653 return FILE_INFORMATION_UNKNOWN; 654 } 655 } else if (repositoryStatus == REPOSITORY_STATUS_CONFLICT) { 656 return new FileInformation(FileInformation.STATUS_VERSIONED_CONFLICT, false); 659 } 660 throw new IllegalArgumentException ("Unknown repository status: " + (char)repositoryStatus + " for: " + file.getAbsolutePath()); } 662 663 private boolean isInsideCvsMetadata(File file) { 664 return file.getAbsolutePath().indexOf(File.separator + CvsVersioningSystem.FILENAME_CVS + File.separator) != -1; 665 } 666 667 private boolean exists(File file) { 668 if (!file.exists()) return false; 669 return file.getAbsolutePath().equals(FileUtil.normalizeFile(file).getAbsolutePath()); 670 } 671 672 private boolean entryTimestampMatches(Entry entry, File file) { 673 Date d = entry.getLastModified(); 674 if (d == null) return false; 675 long t0 = d.getTime(); 676 long t1 = file.lastModified() / 1000 * 1000; 677 if (TimeZone.getDefault().inDaylightTime(entry.getLastModified())) { 678 t1 -= TimeZone.getDefault().getDSTSavings(); 679 } 680 return t0 == t1 || t0 - t1 == 3600000 || t1 - t0 == 3600000; 681 } 682 683 ListenersSupport listenerSupport = new ListenersSupport(this); 684 public void addVersioningListener(VersioningListener listener) { 685 listenerSupport.addListener(listener); 686 } 687 688 public void removeVersioningListener(VersioningListener listener) { 689 listenerSupport.removeListener(listener); 690 } 691 692 private void fireFileStatusChanged(File file, FileInformation oldInfo, FileInformation newInfo) { 693 listenerSupport.fireVersioningEvent(EVENT_FILE_STATUS_CHANGED, new Object [] { file, oldInfo, newInfo }); 694 } 695 696 public FileInformation getCachedStatus(File file) { 697 file = file.getParentFile(); 698 if (file == null) return FILE_INFORMATION_NOTMANAGED_DIRECTORY; 699 Map<File, FileInformation> files = (Map<File, FileInformation>) turbo.readEntry(file, FILE_STATUS_MAP); 700 return files != null ? files.get(file) : null; 701 } 702 703 private static final class NotManagedMap extends AbstractMap<File, FileInformation> { 704 public Set entrySet() { 705 return Collections.EMPTY_SET; 706 } 707 } 708 } 709 | Popular Tags |