-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix SIOOBE in 'ParticipantUtils.getMavenProperty' #452
Fix SIOOBE in 'ParticipantUtils.getMavenProperty' #452
Conversation
vrubezhny
commented
Jul 25, 2023
``` Jul 25, 2023 3:03:17 PM org.eclipse.lemminx.extensions.maven.participants.codeaction.InlinePropertyCodeAction doCodeActionUnconditional SEVERE: begin 2, end 1, length 2 java.lang.StringIndexOutOfBoundsException: begin 2, end 1, length 2 at java.base/java.lang.String.checkBoundsBeginEnd(String.java:4602) at java.base/java.lang.String.substring(String.java:2705) at org.eclipse.lemminx.extensions.maven.utils.ParticipantUtils.getMavenProperty(ParticipantUtils.java:295) at org.eclipse.lemminx.extensions.maven.participants.codeaction.InlinePropertyCodeAction.doCodeActionUnconditional(InlinePropertyCodeAction.java:55) at org.eclipse.lemminx.services.XMLCodeActions.doCodeActions(XMLCodeActions.java:81) at org.eclipse.lemminx.services.XMLLanguageService.doCodeActions(XMLLanguageService.java:284) at org.eclipse.lemminx.XMLTextDocumentService.lambda$codeAction$24(XMLTextDocumentService.java:502) at org.eclipse.lemminx.commons.ModelTextDocuments.lambda$computeModelAsync$0(ModelTextDocuments.java:118) at java.base/java.util.concurrent.CompletableFuture$UniApply.tryFire(CompletableFuture.java:646) at java.base/java.util.concurrent.CompletableFuture$Completion.exec(CompletableFuture.java:483) at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:373) at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1182) at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1655) at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1622) at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:165) Jul 25, 2023 3:03:17 PM org.eclipse.lemminx.extensions.maven.participants.codeaction.ExtractPropertyCodeAction doCodeActionUnconditional SEVERE: begin 2, end 1, length 2 java.lang.StringIndexOutOfBoundsException: begin 2, end 1, length 2 at java.base/java.lang.String.checkBoundsBeginEnd(String.java:4602) at java.base/java.lang.String.substring(String.java:2705) at org.eclipse.lemminx.extensions.maven.utils.ParticipantUtils.getMavenProperty(ParticipantUtils.java:295) at org.eclipse.lemminx.extensions.maven.participants.codeaction.ExtractPropertyCodeAction.doCodeActionUnconditional(ExtractPropertyCodeAction.java:113) at org.eclipse.lemminx.services.XMLCodeActions.doCodeActions(XMLCodeActions.java:81) at org.eclipse.lemminx.services.XMLLanguageService.doCodeActions(XMLLanguageService.java:284) at org.eclipse.lemminx.XMLTextDocumentService.lambda$codeAction$24(XMLTextDocumentService.java:502) at org.eclipse.lemminx.commons.ModelTextDocuments.lambda$computeModelAsync$0(ModelTextDocuments.java:118) at java.base/java.util.concurrent.CompletableFuture$UniApply.tryFire(CompletableFuture.java:646) at java.base/java.util.concurrent.CompletableFuture$Completion.exec(CompletableFuture.java:483) at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:373) at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1182) at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1655) at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1622) at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:165) ```
ce3769d
to
091cb27
Compare
I just ran into this today :
I think I was built on top of this commit. |
@rgrunber What Lemminx-Maven version do you use and how - M2E-Core Editor Lemminx or VSCode-XML? I suspect hat it's possible that document was modified between the
or
? Here it's for sure, the ranges in diagnostic request's node are not coinciding with its DOMDocument's real text... |
I'm on 7a00206 . I run in vscode-xml with :
I'm not sure what causes it to reproduce. I'm just clicking around and occasionally editing things. This time I got :
|