Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ private List<Class<?>> findImplementationsOf(Class<?> implementationTemplate, UR
List<Class<?>> implementations = Lists.newArrayList();
List<String> classes = FileUtils.getFileNames(classesDirectory, "**/*.class", null, false);
for (String classPath : classes) {
String className = classPath.substring(0, classPath.length() - 6).replace('/', '.');
String className = classPath.substring(0, classPath.length() - 6).replace('/', '.').replace('\\', '.');

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldn't it make it more sense, instead of adding another replace to change the existing one into

.replace(File.separatorChar, '.')

which would work on any operating system?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Look my pull request #11

try {
Class<?> implementation = searchRealm.loadClass(implementationTemplate.getName());
Class<?> clazz = searchRealm.loadClass(className);
Expand Down