From b9ff3b6936f1b25cdc338a98e68f8687cbd14d2b Mon Sep 17 00:00:00 2001 From: azerr Date: Fri, 6 Dec 2024 09:06:46 +0100 Subject: [PATCH] fix: StringIndexOutOfBoundsException Fixes #1413 Signed-off-by: azerr --- .../psi/core/project/MicroProfileConfigPropertyInformation.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/redhat/devtools/intellij/lsp4mp4ij/psi/core/project/MicroProfileConfigPropertyInformation.java b/src/main/java/com/redhat/devtools/intellij/lsp4mp4ij/psi/core/project/MicroProfileConfigPropertyInformation.java index 09d35b462..59312baa6 100644 --- a/src/main/java/com/redhat/devtools/intellij/lsp4mp4ij/psi/core/project/MicroProfileConfigPropertyInformation.java +++ b/src/main/java/com/redhat/devtools/intellij/lsp4mp4ij/psi/core/project/MicroProfileConfigPropertyInformation.java @@ -129,7 +129,7 @@ public String getSourceConfigFileURI() { * @return the property name with any profile information removed */ public static String getPropertyNameWithoutProfile(String propertyNameWithProfile) { - if (propertyNameWithProfile.charAt(0) == '%') { + if (propertyNameWithProfile.length() > 0 && propertyNameWithProfile.charAt(0) == '%') { int firstPeriodIndex = propertyNameWithProfile.indexOf('.'); return propertyNameWithProfile.substring(firstPeriodIndex + 1); } else {