diff options
Diffstat (limited to 'stubs/src')
| -rw-r--r-- | stubs/src/kotlin/proxy/KotlinProxyOverrides.java | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/stubs/src/kotlin/proxy/KotlinProxyOverrides.java b/stubs/src/kotlin/proxy/KotlinProxyOverrides.java index 996e06c..a4d6af7 100644 --- a/stubs/src/kotlin/proxy/KotlinProxyOverrides.java +++ b/stubs/src/kotlin/proxy/KotlinProxyOverrides.java @@ -191,16 +191,13 @@ public final class KotlinProxyOverrides { int lineStart = -1; int columnStart = -1; - int lastSpace = parts[0].lastIndexOf(' '); - if (lastSpace != -1 && parts[0].startsWith("(", lastSpace + 1) && parts[0].endsWith(")")) { - String[] locationParts = parts[0].substring(lastSpace + 1, parts[0].length() - 1).split(":"); - if (locationParts.length == 2) { - try { - lineStart = Integer.parseInt(locationParts[0]); - columnStart = Integer.parseInt(locationParts[1]); - path = parts[0].substring(0, lastSpace); - } catch (NumberFormatException e) { - } + String[] locationParts = parts[0].split(":"); + if (locationParts.length == 3) { + try { + lineStart = Integer.parseInt(locationParts[1]); + columnStart = Integer.parseInt(locationParts[2]); + path = locationParts[0]; + } catch (NumberFormatException e) { } } location = CompilerMessageLocationWithRange.Companion.create( @@ -211,7 +208,7 @@ public final class KotlinProxyOverrides { if (parts.length >= 2 && severity == null) { severity = getSeverity(parts[0]); if (severity != null) { - message = String.join(":", Arrays.asList(parts).subList(1, parts.length)); + message = String.join(": ", Arrays.asList(parts).subList(1, parts.length)); } } if (severity == null) { |
