Skip to content

Commit

Permalink
Merge pull request #23470 from geoand/#23001
Browse files Browse the repository at this point in the history
Fix JBang defined class Dev UI linking
  • Loading branch information
geoand authored Feb 8, 2022
2 parents 8cc7f1d + 8f7ea3d commit b4f7fc0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -964,7 +964,7 @@ private List<String> sourcePackagesForRoot(Path langPath) {
}
}
if (rootPackages.isEmpty()) {
return Collections.emptyList();
return List.of("");
}
List<String> result = new ArrayList<>(rootPackages.size());
for (Path rootPackage : rootPackages) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@
if (sourceMap.hasOwnProperty(key)) {
var packages = sourceMap[key];
for (var i = 0; i < packages.length; i++) {
if (className.startsWith(packages[i] + ".")) {
if (className.startsWith(packages[i] + ".") || ((packages[i] === "") && (className.indexOf('.') == -1))) {
return key;
}
}
Expand All @@ -183,7 +183,7 @@
if (sourceLocationMap.hasOwnProperty(key)) {
var packages = sourceLocationMap[key];
for (var i = 0; i < packages.length; i++) {
if (className.startsWith(packages[i] + ".")) {
if (className.startsWith(packages[i] + ".") || ((packages[i] === "") && (className.indexOf('.') == -1))) {
return key;
}
}
Expand Down

0 comments on commit b4f7fc0

Please sign in to comment.