Skip to main content
replaced http://codereview.stackexchange.com/ with https://codereview.stackexchange.com/
Source Link

In this questionthis 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?

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?

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?

edited tags
Link
Jamal Mod
  • 34.9k
  • 2
  • 53
  • 106
Strike out an untrue assertion
Source Link
Wayne Conrad
  • 3.3k
  • 12
  • 6

In this question, an edit to the code (by other than the asker)(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. I've never seen this done; it's pretty clever. However, my understanding is that the code may be edited to, for example, fix obvious indentation errors caused by cut-and-paste. Putting an answer or comment into the code itself seems counter to my understand of accepted practice.

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

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. I've never seen this done; it's pretty clever. However, my understanding is that the code may be edited to, for example, fix obvious indentation errors caused by cut-and-paste. Putting an answer or comment into the code itself seems counter to my understand of accepted practice.

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

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?

Source Link
Wayne Conrad
  • 3.3k
  • 12
  • 6
Loading