DocumentImpl: a faster check for no assertions

This commit is contained in:
peter
2015-02-20 17:41:44 +01:00
parent f8c698fdc1
commit c613d3970f
@@ -770,10 +770,10 @@ public class DocumentImpl extends UserDataHolderBase implements DocumentEx {
}
private void assertInsideCommand() {
if (!myAssertThreading) return;
CommandProcessor commandProcessor = CommandProcessor.getInstance();
if (!commandProcessor.isUndoTransparentActionInProgress() &&
commandProcessor.getCurrentCommand() == null &&
myAssertThreading) {
commandProcessor.getCurrentCommand() == null) {
throw new IncorrectOperationException("Must not change document outside command or undo-transparent action. See com.intellij.openapi.command.WriteCommandAction or com.intellij.openapi.command.CommandProcessor");
}
}