Bug 117458 - Improve message for 'Possible accidental assignment in place of a comparison...'
Summary: Improve message for 'Possible accidental assignment in place of a comparison...'
Status: NEW
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.2   Edit
Hardware: PC Linux
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-11-22 05:39 EST by Maxime Daniel CLA
Modified: 2005-11-23 01:06 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Maxime Daniel CLA 2005-11-22 05:39:10 EST
The 'accidental' word sounds strange in the context of the message, at least I feel so.
Would the use of 'Potentially' instead of 'Possible' help? 
What I mean is that this is the mistake that is 'potential', not the assignment (the assignment is here anyway).
Also 'accidental' is more closely related to an exogenous mishap than it is to a mistake. 'inadvertent' or 'unintentional' would be more precise.
Comment 1 Philipe Mulet CLA 2005-11-22 06:10:21 EST
Kent - we need help from a native speaker.
Comment 2 Kent Johnson CLA 2005-11-22 10:49:18 EST
I assume this is for:

if (i = i) {}

'Possible accidental assignment in place of a comparison. A condition expression should not be reduced to an assignment'

I would be more direct and word it as:

'A comparison statement using == is typical instead of an assignment. A condition expression should not be reduced to an assignment'
Comment 3 Maxime Daniel CLA 2005-11-22 12:55:16 EST
(In reply to comment #2)
> I assume this is for:
> if (i = i) {}
Right.
> 'Possible accidental assignment in place of a comparison. A condition
> expression should not be reduced to an assignment'
> I would be more direct and word it as:
> 'A comparison statement using == is typical instead of an assignment. A
> condition expression should not be reduced to an assignment'
Personally, I like it. 

Comment 4 Kent Johnson CLA 2005-11-22 14:08:17 EST
What about:

'A comparison statement using == is expected. A condition expression should not be the result of an assignment statement'
Comment 5 Maxime Daniel CLA 2005-11-23 01:06:56 EST
(In reply to comment #4)
> What about:
> 'A comparison statement using == is expected. A condition expression should not
> be the result of an assignment statement'

I like the first sentence better than the one of comment #2, since it is even more straightforward.
The second sentence of comment #2 is probably slightly better than the second sentence of this proposal though, since 'assignment statement' sounds odd in this context, and we probably don't want to repeat 'expression' either...
My preference would then go to:
'A comparison statement using == is expected. A condition expression should not be reduced to an assignment'