Skip to content
Merged
Show file tree
Hide file tree
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 @@ -245,21 +245,14 @@ private Type resolveClassType(String name) {

// inner class in imported class
if (preDotName != null && importName.endsWith(preDotName)) {
String fullName = importName + postDotName;
// TODO: we can either resolve with $ or . here depending on if in source or byte code
// should make consistent by always using $ for inner class names
Type type = resolveIfExists(fullName);
if (type != null) {
return type;
}
type = resolveIfExists(importName + postDotName.replace('.', '$'));
val type = resolveIfExists(importName + postDotName.replace('.', '$'));
if (type != null) {
return type;
}
}
}

Type type = resolveIfExists(packageName + '.' + name);
Type type = resolveIfExists(packageName + '.' + name.replace('.', '$'));
if (type != null) {
return type;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public static void getSourceInfos(Iterable<TypeDeclaration<?>> typeDeclarations,
sourceInfos.add(new SourceInfo(() -> typeDeclaration, packageName + typeDeclaration.getName(), classPath));
// suppressed deprecation warning for now
// https://github.com/javaparser/javaparser/issues/1472#issuecomment-424327421
getSourceInfos(typeDeclaration.getChildNodesByType((Class<TypeDeclaration<?>>) (Object) TypeDeclaration.class), classPath, sourceInfos, packageName + typeDeclaration.getNameAsString() + '.');
getSourceInfos(typeDeclaration.getChildNodesByType((Class<TypeDeclaration<?>>) (Object) TypeDeclaration.class), classPath, sourceInfos, packageName + typeDeclaration.getNameAsString() + '$');
}
}
}