-4

Edit:

Based on the comments (thanks) I posted my solution as a separate answer: https://stackoverflow.com/a/36485266/1052697

Original question:

This Android answer has some major flaws in it, because it can cause an IndexOutOfBoundsException when pasting text with multiple new-line characters.

"Copy pasting from Stack Overflow danger ahead"

Because the answer has quite some up-votes (and apparently many people use the code provided as it is) I decided to edit it (edited version).

The edits I made are in my opinion quite significant, the complete code logic has been changed. Now I'm wondering if I did the right thing. The answer also originally stated the following:

This solution was created in collaboration with Mobile Identity: http://www.mobile-identity.com/

Which isn't the best online advertisement for Mobile Identity...

Anyway, I also decided to remove the statement. As it does not contribute to the answer nor is it needed. I Also removed it because non of the original code-logic stayed the same (so any credit to Mobile Identity seems to be out of place).

Did I do the right thing? Should I have posted a completely new answer?

4
  • 1
    That seems like a significant change to the answer and not what the original author intended.
    – Joe W
    Commented Apr 7, 2016 at 15:51
  • 5
    Looks like you turned it into a completely different answer. I suggest rolling those changes back. Then post a comment under the original answer outlining the issue, upvote other comments, and submit a new solution. It wasn't your edit which was upvoted, it was the original.
    – CubeJockey
    Commented Apr 7, 2016 at 15:51
  • This solution was created in collaboration with Mobile Identity: http://www.mobile-identity.com/ - this is back in since the last rollback - is this.. ok? I wouldn't have thought this was ok. Edit: I'll try removing it and see if it's accepted.
    – Octopoid
    Commented Apr 7, 2016 at 18:31
  • related: The “I Get It” Reputation Problem (luckily, voting at per-site-meta doesn't really impact reputation)
    – gnat
    Commented Apr 7, 2016 at 20:12

1 Answer 1

10

No, it's not okay to just replace someone else's answer with your own. If you feel that there is a problem with their answer, feel free to vote accordingly and/or comment on the answer explaining what problems it has. If you have your own solution that you feel is better, post it as a new answer.

Edits exist to improve the presentation of someone else's solution, not to change someone else's solution to your own.

1

Not the answer you're looking for? Browse other questions tagged .