sonatype-lift[bot] commented on a change in pull request #544: URL: https://github.com/apache/solr/pull/544#discussion_r788332222
########## File path: solr/core/src/java/org/apache/solr/rest/ManagedResourceStorage.java ########## @@ -119,20 +120,20 @@ public static StorageIO newStorageIO(String collection, SolrResourceLoader resou if (storageIO instanceof FileStorageIO) { // using local fs, if storageDir is not set in the solrconfig.xml, assume the configDir for the core if (initArgs.get(STORAGE_DIR_INIT_ARG) == null) { - File configDir = new File(resourceLoader.getConfigDir()); + Path configDir = resourceLoader.getConfigPath(); boolean hasAccess = false; try { - hasAccess = configDir.isDirectory() && configDir.canWrite(); - } catch (java.security.AccessControlException ace) {} + hasAccess = Files.isDirectory(configDir) && Files.isWritable(configDir); + } catch (SecurityException noAccess) {} Review comment: *EmptyCatch:* Caught exceptions should not be ignored [(details)](https://google.github.io/styleguide/javaguide.html#s6.2-caught-exceptions) (at-me [in a reply](https://help.sonatype.com/lift/talking-to-lift) with `help` or `ignore`) ########## File path: solr/core/src/java/org/apache/solr/handler/admin/ShowFileRequestHandler.java ########## @@ -350,15 +352,15 @@ public static String getAdminFileFromZooKeeper(SolrQueryRequest req, SolrQueryRe // Find the file indicated by the "file=XXX" parameter or the root of the conf directory on the local // file system. Respects all the "interesting" stuff around what the resource loader does to find files. - public static File getAdminFileFromFileSystem(SolrQueryRequest req, SolrQueryResponse rsp, + public static Path getAdminFileFromFileSystem(SolrQueryRequest req, SolrQueryResponse rsp, Set<String> hiddenFiles) { File adminFile = null; Review comment: *UnusedVariable:* The local variable 'adminFile' is never read. [(details)](https://errorprone.info/bugpattern/UnusedVariable) (at-me [in a reply](https://help.sonatype.com/lift/talking-to-lift) with `help` or `ignore`) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org For additional commands, e-mail: issues-h...@solr.apache.org