Skip to content
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 ChangeUtil for non-MultiTextEdit conversion #1095

Merged
merged 1 commit into from
Jul 8, 2019

Conversation

Eskibear
Copy link
Contributor

@Eskibear Eskibear commented Jul 8, 2019

Signed-off-by: Yan Zhang [email protected]

Reason

When I was passing a simple InsertEdit, this method failed to process the edit as it had no children.

Change

  • For MultiTextEdit, process its children; otherwise process the edit itself.
  • Remove the zero-length check as it's already guarded by the for-loop. There's also no NPE risk as TextEdit.getChildren() always returns a non-null array.

@Eskibear
Copy link
Contributor Author

Eskibear commented Jul 8, 2019

java.lang.AssertionError: No pom.xml errors were found expected:<3> but was:<6>
at org.eclipse.jdt.ls.core.internal.handlers.WorkspaceDiagnosticsHandlerTest.testResetPomDiagnostics(WorkspaceDiagnosticsHandlerTest.java:400)

CI failed with above case, which passed in my local environment. And the change should not affect the case. Close & reopen the PR to retrigger it.

@Eskibear Eskibear closed this Jul 8, 2019
@Eskibear Eskibear reopened this Jul 8, 2019
@fbricon fbricon added the bug label Jul 8, 2019
@fbricon fbricon added this to the Mid July 2019 milestone Jul 8, 2019
@fbricon fbricon merged commit 9f6eb0c into eclipse-jdtls:master Jul 8, 2019
@Eskibear Eskibear deleted the textEdit branch July 8, 2019 14:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants