RepositoryInfo.java 文件源码

java
阅读 18 收藏 0 点赞 0 评论 0

项目:incubator-netbeans 作者:
private void setActiveBranch (Map<String, GitBranch> branches) throws GitException {
    for (Map.Entry<String, GitBranch> e : branches.entrySet()) {
        if (e.getValue().isActive()) {
            GitBranch oldActiveBranch = activeBranch;
            activeBranch = e.getValue();
            if (oldActiveBranch == null || !oldActiveBranch.getName().equals(activeBranch.getName())) {
                LOG.log(Level.FINE, "active branch changed: {0} --- {1}", new Object[] { rootRef, activeBranch.getName() }); //NOI18N
                firePropertyChange(new PropertyChangeEvent(this, PROPERTY_ACTIVE_BRANCH, oldActiveBranch, activeBranch));
            }
            if (oldActiveBranch == null || !oldActiveBranch.getId().equals(activeBranch.getId())) {
                LOG.log(Level.FINE, "current HEAD changed: {0} --- {1}", new Object[] { rootRef, activeBranch.getId() }); //NOI18N
                firePropertyChange(new PropertyChangeEvent(this, PROPERTY_HEAD, oldActiveBranch, activeBranch));
            }
        }
    }
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号