In this question, an edit to the code (by other than the asker) added this block of comments to the code:

    // duplication
//     ||
//    \||/
//     \/
try {
listener = (SomeListener) activity;
} catch (ClassCastException e) {
throw new ClassCastException(activity.toString()
+ " must implement SomeListener");
}


This appears to be an answer or comment, of sorts.

Is this good practice? Should I flag it for moderator attention?

The edit history at https://codereview.stackexchange.com/posts/39091/revisions shows that that edit was made by the OP.

Also IMO it's OK to edit question text to clarify the question (if you're sure of your clarification): similarly therefore IMO it's OK to add comments (not code) to the code, if (again) you're sure of your clarification, and if you think that clarification is necessary/helpful to help other people to understand the question.

• I missed that it was the OP who made the edit. I didn't read the history close enough. Oops! – Wayne Conrad Jan 12 '14 at 14:28
• Similarly, if you're sure that an edit is wrong, you can use edit history to "Roll back" the edit to a previous version (explaining why you did so in an edit comment). If doing so results in an "edit war" then you might/must flag it for moderator attention. – ChrisW Jan 12 '14 at 14:32
• @ChrisW: Community♦ will also raise an autoflag in these instances. – Jamal Jan 12 '14 at 18:44