style: optimize if-statement and assignment

This commit is contained in:
Nadya Zabrodina
2014-05-04 21:49:52 +04:00
parent c32cafb4db
commit adac2dab5b
@@ -67,9 +67,8 @@ public class HgProjectSettings implements PersistentStateComponent<HgProjectSett
}
public void setIgnoreWhitespacesInAnnotations(boolean ignoreWhitespacesInAnnotations) {
final boolean changed = myState.myIgnoreWhitespacesInAnnotations != ignoreWhitespacesInAnnotations;
myState.myIgnoreWhitespacesInAnnotations = ignoreWhitespacesInAnnotations;
if (changed) {
if (myState.myIgnoreWhitespacesInAnnotations != ignoreWhitespacesInAnnotations) {
myState.myIgnoreWhitespacesInAnnotations = ignoreWhitespacesInAnnotations;
myProject.getMessageBus().syncPublisher(VcsAnnotationRefresher.LOCAL_CHANGES_CHANGED).configurationChanged(HgVcs.getKey());
}
}