EA-216299: fix SIOOBE in completion
This commit is contained in:
+2
-2
@@ -47,8 +47,8 @@ class ToFromOriginalFileMapper private constructor(
|
|||||||
init {
|
init {
|
||||||
val originalText = originalFile.text
|
val originalText = originalFile.text
|
||||||
val syntheticText = syntheticFile.text
|
val syntheticText = syntheticFile.text
|
||||||
val originalSubSequence = originalText.subSequence(0, completionOffset)
|
val originalSubSequence = originalText.take(completionOffset)
|
||||||
val syntheticSubSequence = syntheticText.subSequence(0, completionOffset)
|
val syntheticSubSequence = syntheticText.take(completionOffset)
|
||||||
checkWithAttachment(originalSubSequence == syntheticSubSequence, {
|
checkWithAttachment(originalSubSequence == syntheticSubSequence, {
|
||||||
"original subText [len: ${originalSubSequence.length}]" +
|
"original subText [len: ${originalSubSequence.length}]" +
|
||||||
" does not match synthetic subText [len: ${syntheticSubSequence.length}]"
|
" does not match synthetic subText [len: ${syntheticSubSequence.length}]"
|
||||||
|
|||||||
Reference in New Issue
Block a user