Skip to content

Fix #6538: Make interfaces.SourcePosition resilient to missing sources #6573

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

Merged
merged 4 commits into from
May 28, 2019

Conversation

nicolasstucki
Copy link
Contributor

No description provided.

@nicolasstucki nicolasstucki requested a review from liufengyun May 27, 2019 16:17
@nicolasstucki nicolasstucki marked this pull request as ready for review May 27, 2019 17:08
@nicolasstucki nicolasstucki changed the title Make interfaces.SourcePosition resilient to missing sources Fix #6538: Make interfaces.SourcePosition resilient to missing sources May 27, 2019
Copy link
Member

@smarter smarter left a comment

Choose a reason for hiding this comment

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

I think pointer and pointerSpace should return an empty Optional if we don't have a source.

@@ -86,7 +86,9 @@ public void doReport(MessageContainer cont, Context ctx) {
return Optional.ofNullable(src.file().path());
Copy link
Member

Choose a reason for hiding this comment

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

Would be clearer to use if (src.exists()), same for sourceFile above.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

@nicolasstucki nicolasstucki requested review from smarter and removed request for liufengyun May 28, 2019 05:49
@nicolasstucki nicolasstucki assigned smarter and unassigned liufengyun May 28, 2019
@nicolasstucki
Copy link
Contributor Author

@smarter could you have a look at the last two commits that add your suggestions

@nicolasstucki nicolasstucki merged commit 9e46225 into scala:master May 28, 2019
@nicolasstucki nicolasstucki deleted the fix-#6538 branch May 28, 2019 10:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants