if ( key != null ) id = new ConflictId( key, 0 ); ids.put( key, id );
private void buildConflitIdDAG( Map<Object, ConflictId> ids, DependencyNode node, ConflictId id, int depth, Map<DependencyNode, Object> visited, Map<?, ?> conflictIds ) { if ( visited.put( node, Boolean.TRUE ) != null ) { return; } depth++; for ( DependencyNode child : node.getChildren() ) { Object key = conflictIds.get( child ); ConflictId childId = ids.get( key ); if ( childId == null ) { childId = new ConflictId( key, depth ); ids.put( key, childId ); } else { childId.pullup( depth ); } if ( id != null ) { id.add( childId ); } buildConflitIdDAG( ids, child, childId, depth, visited, conflictIds ); } }
if ( key != null ) id = new ConflictId( key, 0 ); ids.put( key, id );
private void buildConflitIdDAG( Map<Object, ConflictId> ids, DependencyNode node, ConflictId id, int depth, Map<DependencyNode, Object> visited, Map<?, ?> conflictIds ) { if ( visited.put( node, Boolean.TRUE ) != null ) { return; } depth++; for ( DependencyNode child : node.getChildren() ) { Object key = conflictIds.get( child ); ConflictId childId = ids.get( key ); if ( childId == null ) { childId = new ConflictId( key, depth ); ids.put( key, childId ); } else { childId.pullup( depth ); } if ( id != null ) { id.add( childId ); } buildConflitIdDAG( ids, child, childId, depth, visited, conflictIds ); } }
public void pullup( int depth ) { if ( depth < minDepth ) { minDepth = depth; depth++; for ( ConflictId child : children ) { child.pullup( depth ); } } }
public void pullup( int depth ) { if ( depth < minDepth ) { minDepth = depth; depth++; for ( ConflictId child : children ) { child.pullup( depth ); } } }