-
Notifications
You must be signed in to change notification settings - Fork 356
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
Improve documentation of commonAssignmentCheck and correct overrides #6347
base: master
Are you sure you want to change the base?
Conversation
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 have a few questions.
@@ -172,15 +171,16 @@ protected boolean commonAssignmentCheck( | |||
} | |||
|
|||
@Override | |||
@FormatMethod |
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.
Why is this removed?
@@ -101,14 +104,11 @@ protected boolean commonAssignmentCheck( | |||
} | |||
|
|||
if (isLessThan) { | |||
// Print the messages because super isn't called. |
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.
Why is this removed?
* <p>Because this method is not called for all pseudo-assignments, subclasses should only | ||
* override this, if the tree of the value expression is required; otherwise, override {@link | ||
* #commonAssignmentCheck(AnnotatedTypeMirror, AnnotatedTypeMirror, Tree, String, Object...)}. If | ||
* this method is overridden, then the first then should call {@link |
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.
Could you clarify this?
* variableType} and emits an error message (through the compiler's messaging interface) if it is | ||
* not valid. | ||
* | ||
* <p>Subclasses should override this method if in all cases unless the tree for the {@code |
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.
Grammar issue here.
if (showchecks) { | ||
TypeMirror exprTypeMirror = TreeUtils.typeOf(exprTree); | ||
System.out.printf( | ||
"%s %s (at %s): actual tree = %s %s%n expected: %s %s%n", |
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.
Why is this labeled "expected"? That doesn't seem to fit with shouldSkipUses(ExpressionTree)
.
@smillst A ping in case this fell through the cracks. It isn't urgent, though. |
No description provided.