private Set<Path> getFileRepo() { if (this.scmRepository != null) { try { Resource resource = this.resourceLoader.getResource(this.scmRepository.getUri()); if (resource instanceof FileSystemResource) { return Collections.singleton(Paths.get(resource.getURI())); } } catch (IOException e) { log.error("Cannot resolve URI for path: " + this.scmRepository.getUri()); } } if (this.nativeEnvironmentRepository != null) { Set<Path> paths = new LinkedHashSet<>(); for (String path : this.nativeEnvironmentRepository.getSearchLocations()) { Resource resource = this.resourceLoader.getResource(path); if (resource.exists()) { try { paths.add(Paths.get(resource.getURI())); } catch (Exception e) { log.error("Cannot resolve URI for path: " + path); } } } return paths; } return null; }
private Set<Path> getFileRepo() { if (this.scmRepository != null) { try { Resource resource = this.resourceLoader.getResource(this.scmRepository.getUri()); if (resource instanceof FileSystemResource) { return Collections.singleton(Paths.get(resource.getURI())); } } catch (IOException e) { log.error("Cannot resolve URI for path: " + this.scmRepository.getUri()); } } if (this.nativeEnvironmentRepository != null) { Set<Path> paths = new LinkedHashSet<>(); for (String path : this.nativeEnvironmentRepository.getSearchLocations()) { Resource resource = this.resourceLoader.getResource(path); if (resource.exists()) { try { paths.add(Paths.get(resource.getURI())); } catch (Exception e) { log.error("Cannot resolve URI for path: " + path); } } } return paths; } return null; }