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 compiler warning #941
Fix compiler warning #941
Conversation
Refer to this link for build results (access rights to CI server needed): |
@@ -131,6 +131,7 @@ class MoveClass extends RefactoringExecutorWithWizard { | |||
(change :: textChanges, newFiles) | |||
case (change: NewFileChange, (textChanges, newFilesChanges)) => | |||
(textChanges, change :: newFilesChanges) | |||
case (other, _) => throw new AssertionError(s"Unexpected change $other") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please improve the message in a way that it explains that only TextChange
and NewFileChange
make sense here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see any difference between throwing MatchError
and AssertionError
. Actually, as @sschaef noticed, MatchError
gives you more information. I understand the warning is gone, but then let's report the error in a better way. (or use @unchecked
to silence the warning).
Fixes #1002444
e5cff9f
to
ef17feb
Compare
Hmm, you have a point. Please tell me if you like the new message better; if not I'd go for the |
Refer to this link for build results (access rights to CI server needed): |
LGTM |
Fixes #1002444