提交 c84f5630 编写于 作者: A anthony

6887249: Get rid of double-check for isValid() idiom in validate() methods

Reviewed-by: art, dcherepanov
上级 83043586
......@@ -1583,8 +1583,6 @@ public class Container extends Component {
* @see #validateTree
*/
public void validate() {
/* Avoid grabbing lock unless really necessary. */
if (!isValid() || descendUnconditionallyWhenValidating) {
boolean updateCur = false;
synchronized (getTreeLock()) {
if ((!isValid() || descendUnconditionallyWhenValidating)
......@@ -1612,7 +1610,6 @@ public class Container extends Component {
updateCursorImmediately();
}
}
}
/**
* Indicates whether valid containers should also traverse their
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册