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

NavigateToDefinitionHandler should not return null #1143

Merged
merged 1 commit into from
Aug 29, 2019
Merged

NavigateToDefinitionHandler should not return null #1143

merged 1 commit into from
Aug 29, 2019

Conversation

OmarTawfik
Copy link
Contributor

When testing an instance of the server running locally in VSCode, I noticed quite a few error messages like the following from the node client:

Screen Shot 2019-08-05 at 4 37 02 PM

I tracked it down to this handler. Making this update to return an empty list instead, which makes the VSCode client happy. I've updated the tests.

@eclipse-ls-bot
Copy link

Can one of the admins verify this patch?

@OmarTawfik OmarTawfik closed this Aug 6, 2019
Copy link
Contributor

@fbricon fbricon left a comment

Choose a reason for hiding this comment

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

Why did you close this PR?

@@ -45,7 +46,7 @@ public NavigateToDefinitionHandler(PreferenceManager preferenceManager) {
location = computeDefinitionNavigation(unit, position.getPosition().getLine(),
position.getPosition().getCharacter(), monitor);
}
return location == null ? null : Arrays.asList(location);
return location == null ? new ArrayList<Location>() : Arrays.asList(location);
Copy link
Contributor

Choose a reason for hiding this comment

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

Collections.emptyList()

@OmarTawfik OmarTawfik reopened this Aug 12, 2019
@OmarTawfik
Copy link
Contributor Author

@fbricon updated the PR :) apologies for the delay!

@fbricon
Copy link
Contributor

fbricon commented Aug 19, 2019

Can you please sign-off your commit so I can merge it?

@OmarTawfik
Copy link
Contributor Author

@fbricon I think something is messed up with the authentication system :( First it told me that my email doesn't match (as I created the last commit from GitHub UI). So I found this:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=498340

Which indicated that I should create it from command line instead. I did that and force pushed, but it is still failing. Here is my commit info:
https://api.github.com/repos/eclipse/eclipse.jdt.ls/commits/baa0008750522581e2ff106760e1baf7a854930c

It has the right email:

      "email": "[email protected]",

But still I get an error message from the CLA site:

Omar Tawfik (omartawfik@****.noreply) did not include the "Signed-off-by footer" which is required for all commits made by a contributor.

Is it a bug in the email parser? notice it says omartawfik@****.noreply not omartawfik@****.noreply.github.com. Maybe it is a red herring, but it looks like the site is splitting the domain incorrectly.
Is there a workaround for this? I don't want to use my personal email here.

@fbricon
Copy link
Contributor

fbricon commented Aug 29, 2019

I'm not sure. Reading https://bugs.eclipse.org/bugs/show_bug.cgi?id=498340, it seems this should work for the web ui.
If you pushed from CLI, then most likely the issue is you need to sign-off the commit: git commit --amend -s

@fbricon
Copy link
Contributor

fbricon commented Aug 29, 2019

... then you should see something similar to "Signed-off-by: [email protected]" in the commit message.

@OmarTawfik
Copy link
Contributor Author

@fbricon that solved it!

@fbricon fbricon merged commit ffd5d99 into eclipse-jdtls:master Aug 29, 2019
@fbricon
Copy link
Contributor

fbricon commented Aug 29, 2019

Thanks @OmarTawfik !

@fbricon fbricon added the bug label Aug 29, 2019
@fbricon fbricon added this to the End August 2019 milestone Aug 29, 2019
@OmarTawfik OmarTawfik deleted the patch-1 branch September 27, 2019 03:01
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.

3 participants