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 param and exception addition/deletion in method signature refactoring #2754

Merged
merged 1 commit into from
Jul 14, 2023

Conversation

hopehadfield
Copy link
Contributor

@hopehadfield hopehadfield commented Jul 11, 2023

@hopehadfield hopehadfield marked this pull request as ready for review July 11, 2023 20:07
@rgrunber rgrunber self-requested a review July 11, 2023 20:34
Copy link
Contributor

@rgrunber rgrunber left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks very good.

The parameter logic seems to be good, and I like that there's a notification for the case when nothing has changed.

I noticed that if I have one exception, and I attempt to change it, I get the "signature and return type unchanged" error, which doesn't seem right.

I think the problem is at https://github.com/eclipse/eclipse.jdt.ls/pull/2754/files#diff-77600cb6e4bae536fc5ccbff3e7d12974c5773c3f446ad8f8956c09335b62973L116 . exception.typeHandleIdentifier is the identifier of the old exception, so even when you change the exception, it gets interpreted as the old one, hence no change. I think what you need here is to only use exception.typeHandleIdentifier if the name of the new exception matches the old one.

…ring

Signed-off-by: Hope Hadfield <hhadfiel@redhat.com>
@rgrunber rgrunber merged commit 24c3892 into eclipse-jdtls:master Jul 14, 2023
@hopehadfield hopehadfield deleted the 3098-exception branch July 18, 2023 17:34
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.

One more comment for exception is added every time after refactoring
2 participants