What is meta? ×
Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 130 Stack Exchange communities.

Can I approve the code edit... the editor changed the code as public final Bar b; to public Bar b; . Is this right? To edit the code in a question?

Question:

public enum Foo {
  A, B, C;

  setResponse(Bar b) {
    this.b = b;
  }

  public final Bar b;
}

static {
  A.setResponse(Bar.Alpha);
  B.setResponse(Bar.Delta);
  C.setResponse(Bar.Alpha);
}

Edit:

public enum Foo {
  A, B, C;

  private void setResponse(Bar b) {
      this.b = b;
  }

  public Bar b;

  static {
    A.setResponse(Bar.Alpha);
    B.setResponse(Bar.Delta);
    C.setResponse(Bar.Alpha);
  }
}
share|improve this question
1  
Can you provide a link to the question? –  jmort253 May 27 '13 at 2:38
    
Yes, please provide the link. 2k users can undo the edit. –  Undo May 27 '13 at 2:41
    
sorry...on review (suggestion edit), i saw the question....and didn't know the link –  Tamil Selvan May 27 '13 at 2:45
    

2 Answers 2

up vote 15 down vote accepted

Don't make edits like that - they may change the meaning of the question. Often times the problem could be within the way the syntax is formed (which, ironically, makes it "Too Localized").

Also, if you see an edit like this, please reject it as a radical change.

The intention behind edits is to improve the quality of the question without harming the original content or question. Making edits to the code like that could alter the question, or alter the answers provided (or to be provided).

share|improve this answer

Editing for readability is generally good. This can include proper indentation, and about the most radical change I can think that would be acceptable is removing blatantly obviously unnecessary code.

Editing for content is bad. Either you made an irrelevant change in which case, why are you making an irrelevant change? Or you changed the question, which is the wrong thing to do. You may have inadvertently supplied a hint or an answer, in which case, please post as a comment or as an answer, respectively. It's a very bad workflow for the OP's code to be edited in a subtle way that the OP does not notice, particularly given that the OP is presumably having some problem or misapprehension with the code at hand.

share|improve this answer

You must log in to answer this question.

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