Skip to content

Commit 1a2f086

Browse files
committed
avoid IndexOutOfBoundsException when class is in the unnamed package
1 parent cf4afd2 commit 1a2f086

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

core/runtime/src/main/java/io/quarkus/runtime/logging/DecorateStackUtil.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,9 @@ private static List<String> getRelatedLinesInSource(Path filePath, int lineNumbe
130130

131131
private static String getFullPath(String fullClassName, String fileName) {
132132
int lastDotIndex = fullClassName.lastIndexOf(".");
133+
if (lastDotIndex == -1) {
134+
return fileName;
135+
}
133136
String packageName = fullClassName.substring(0, lastDotIndex);
134137
String path = packageName.replace('.', '/');
135138
return path + "/" + fileName;

0 commit comments

Comments
 (0)