@Test(expected = LocalAccessDeniedException.class) public void testListNotFound() throws Exception { final String name = UUID.randomUUID().toString(); FinderLocal l = new FinderLocal(System.getProperty("java.io.tmpdir"), name); l.list(); }
@Override public AttributedList<Local> list(final Filter<String> filter) throws AccessDeniedException { final NSURL resolved; try { resolved = this.lock(true); if(null == resolved) { return super.list(filter); } final AttributedList<Local> list = super.list(resolved.path(), filter); this.release(resolved); return list; } catch(LocalAccessDeniedException e) { log.warn(String.format("Failure obtaining lock for %s. %s", this, e)); return super.list(filter); } }
FinderLocal extends Local { @Override public AttributedList<Local> list(final Filter<String> filter) throws AccessDeniedException { final NSURL resolved; try { resolved = this.lock(true); if(null == resolved) { return super.list(filter); } final AttributedList<Local> list = super.list(resolved.path(), filter); this.release(resolved); return list; } catch(LocalAccessDeniedException e) { log.warn(String.format("Failure obtaining lock for %s. %s", this, e)); return super.list(filter); } } }
FinderLocal extends Local { @Override public AttributedList<Local> list(final Filter<String> filter) throws AccessDeniedException { final NSURL resolved; try { resolved = this.lock(true); if(null == resolved) { return super.list(filter); } final AttributedList<Local> list = super.list(resolved.path(), filter); this.release(resolved); return list; } catch(LocalAccessDeniedException e) { log.warn(String.format("Failure obtaining lock for %s. %s", this, e)); return super.list(filter); } } FinderLocal(final Local parent, final String name);  FinderLocal(final Local parent, final String name, final FilesystemBookmarkResolver<NSURL> resolver);  FinderLocal(final String parent, final String name);  FinderLocal(final String parent, final String name, final FilesystemBookmarkResolver<NSURL> resolver);  FinderLocal(final String path);  FinderLocal(final String name, final FilesystemBookmarkResolver<NSURL> resolver); }
FinderLocal extends Local { @Override public AttributedList<Local> list(final Filter<String> filter) throws AccessDeniedException { final NSURL resolved; try { resolved = this.lock(true); if(null == resolved) { return super.list(filter); } final AttributedList<Local> list = super.list(resolved.path(), filter); this.release(resolved); return list; } catch(LocalAccessDeniedException e) { log.warn(String.format("Failure obtaining lock for %s. %s", this, e)); return super.list(filter); } } FinderLocal(final Local parent, final String name);  FinderLocal(final Local parent, final String name, final FilesystemBookmarkResolver<NSURL> resolver);  FinderLocal(final String parent, final String name);  FinderLocal(final String parent, final String name, final FilesystemBookmarkResolver<NSURL> resolver);  FinderLocal(final String path);  FinderLocal(final String name, final FilesystemBookmarkResolver<NSURL> resolver); @Override T serialize(final Serializer dict); @Override String getDisplayName(); @Override String getAbbreviatedPath(); @Override Local getVolume(); @Override boolean exists(final LinkOption... options); @Override String getBookmark(); @Override void setBookmark(final String data); @Override AttributedList<Local> list(final Filter<String> filter); @Override OutputStream getOutputStream(boolean append); @Override NSURL lock(final boolean interactive); @Override void release(final Object lock); @Override InputStream getInputStream(); @Override FinderLocalAttributes attributes(); }
FinderLocal extends Local { @Override public AttributedList<Local> list(final Filter<String> filter) throws AccessDeniedException { final NSURL resolved; try { resolved = this.lock(true); if(null == resolved) { return super.list(filter); } final AttributedList<Local> list = super.list(resolved.path(), filter); this.release(resolved); return list; } catch(LocalAccessDeniedException e) { log.warn(String.format("Failure obtaining lock for %s. %s", this, e)); return super.list(filter); } } FinderLocal(final Local parent, final String name);  FinderLocal(final Local parent, final String name, final FilesystemBookmarkResolver<NSURL> resolver);  FinderLocal(final String parent, final String name);  FinderLocal(final String parent, final String name, final FilesystemBookmarkResolver<NSURL> resolver);  FinderLocal(final String path);  FinderLocal(final String name, final FilesystemBookmarkResolver<NSURL> resolver); @Override T serialize(final Serializer dict); @Override String getDisplayName(); @Override String getAbbreviatedPath(); @Override Local getVolume(); @Override boolean exists(final LinkOption... options); @Override String getBookmark(); @Override void setBookmark(final String data); @Override AttributedList<Local> list(final Filter<String> filter); @Override OutputStream getOutputStream(boolean append); @Override NSURL lock(final boolean interactive); @Override void release(final Object lock); @Override InputStream getInputStream(); @Override FinderLocalAttributes attributes();  }