mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
diagnostics instead of SIOOBE when checking completion copy consistency (EA-48732)
This commit is contained in:
+2
-1
@@ -145,7 +145,8 @@ class CompletionAssertions {
|
||||
}
|
||||
|
||||
final TextRange range = insertedElement.getTextRange();
|
||||
if (!range.substring(fileCopy.getText()).equals(insertedElement.getText())) {
|
||||
String fileCopyText = fileCopy.getText();
|
||||
if ((range.getEndOffset() > fileCopyText.length()) || !range.substring(fileCopyText).equals(insertedElement.getText())) {
|
||||
throw new LogEventException("Inconsistent completion tree", "range=" + range + "\n" + DebugUtil.currentStackTrace(),
|
||||
createFileTextAttachment(fileCopy, originalFile), createAstAttachment(fileCopy, originalFile),
|
||||
new Attachment("Element at caret.txt", insertedElement.getText()));
|
||||
|
||||
Reference in New Issue
Block a user