@Test public void testAccessDenied() { final NSBundle bundle = new BundleApplicationResourcesFinder().bundle(NSBundle.bundleWithPath("."), new Local("/usr/bin/java") { @Override public Local getSymlinkTarget() throws NotfoundException { throw new NotfoundException("f"); } }); Assert.assertNotNull(bundle); Assert.assertEquals(NSBundle.bundleWithPath("."), bundle); }
public NSBundle bundle() { if(cached != null) { return cached; } if(log.isInfoEnabled()) { log.info("Loading application bundle resources"); } final NSBundle main = NSBundle.mainBundle(); if(null == main) { cached = null; } else { final Local executable = new FinderLocal(main.executablePath()); cached = this.bundle(main, executable); } return cached; }
BundleApplicationResourcesFinder implements ApplicationResourcesFinder { public NSBundle bundle() { if(cached != null) { return cached; } if(log.isInfoEnabled()) { log.info("Loading application bundle resources"); } final NSBundle main = NSBundle.mainBundle(); if(null == main) { cached = null; } else { final Local executable = new FinderLocal(main.executablePath()); cached = this.bundle(main, executable); } return cached; } }
BundleApplicationResourcesFinder implements ApplicationResourcesFinder { public NSBundle bundle() { if(cached != null) { return cached; } if(log.isInfoEnabled()) { log.info("Loading application bundle resources"); } final NSBundle main = NSBundle.mainBundle(); if(null == main) { cached = null; } else { final Local executable = new FinderLocal(main.executablePath()); cached = this.bundle(main, executable); } return cached; }  }
BundleApplicationResourcesFinder implements ApplicationResourcesFinder { public NSBundle bundle() { if(cached != null) { return cached; } if(log.isInfoEnabled()) { log.info("Loading application bundle resources"); } final NSBundle main = NSBundle.mainBundle(); if(null == main) { cached = null; } else { final Local executable = new FinderLocal(main.executablePath()); cached = this.bundle(main, executable); } return cached; }  @Override Local find(); NSBundle bundle(); }
BundleApplicationResourcesFinder implements ApplicationResourcesFinder { public NSBundle bundle() { if(cached != null) { return cached; } if(log.isInfoEnabled()) { log.info("Loading application bundle resources"); } final NSBundle main = NSBundle.mainBundle(); if(null == main) { cached = null; } else { final Local executable = new FinderLocal(main.executablePath()); cached = this.bundle(main, executable); } return cached; }  @Override Local find(); NSBundle bundle();  }