hudi-agent commented on code in PR #19624:
URL: https://github.com/apache/hudi/pull/19624#discussion_r3775850292


##########
hudi-common/src/test/java/org/apache/hudi/common/util/TestReflectionUtils.java:
##########
@@ -57,4 +72,124 @@ void testGetMethod() {
         "listDirectEntries", StoragePathFilter.class).isPresent());
     assertFalse(getMethod(HoodieStorage.class, 
"nonExistentMethod").isPresent());
   }
+
+  /**
+   * An exploded directory on the classpath, reached over the "file" protocol. 
Built explicitly
+   * rather than relying on the test classpath, because under Maven the 
modules are jars and this
+   * branch would never be entered.
+   */
+  @Test
+  void testGetTopLevelClassesInClasspathFromDirectory(@TempDir Path tempDir) 
throws Exception {
+    String scanned = ReflectionUtils.class.getPackage().getName();
+    Path root = tempDir.resolve("classes");
+    Path pkgDir = root.resolve(scanned.replace('.', 
java.io.File.separatorChar));

Review Comment:
   🤖 nit: could you add `import java.io.File;` at the top and use 
`File.separatorChar` here? The fully-qualified inline form is a bit awkward to 
read mid-expression.
   
   <sub><i>⚠️ AI-generated; verify before applying. React 👍/👎 to flag 
quality.</i></sub>



-- 
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]

Reply via email to