epugh commented on code in PR #3696:
URL: https://github.com/apache/solr/pull/3696#discussion_r2408271149


##########
solr/core/src/java/org/apache/solr/handler/admin/ShowFileRequestHandler.java:
##########
@@ -374,7 +375,17 @@ public static Path getAdminFileFromFileSystem(
     if (!Files.exists(configDir)) {
       // TODO: maybe we should just open it this way to start with?
       try {
-        configDir = 
Path.of(loader.getClassLoader().getResource(loader.getConfigDir()).toURI());
+        URL configUrl = 
loader.getClassLoader().getResource(loader.getConfigPath().toString());
+        if (configUrl == null) {
+          log.error("Configuration directory resource not found: {}", 
loader.getConfigPath());

Review Comment:
   Wish we had a rule to spot these and prevent this.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to