void (@NotNull DocumentEvent event) { Document document = event.getDocument(); int textLength = document.getTextLength(); expectedResults = new int[textLength + 1]; for (int i = 0; i <= textLength; i++) { expectedResults[i] = document.getLineNumber(i); } }