File tree Expand file tree Collapse file tree 3 files changed +6
-17
lines changed
main/java/guru/nidi/graphviz
test/java/guru/nidi/graphviz Expand file tree Collapse file tree 3 files changed +6
-17
lines changed Original file line number Diff line number Diff line change 1717
1818import java .util .List ;
1919
20+ import static java .util .Arrays .asList ;
21+
2022public interface Attributes <F extends For > {
2123 Attributes <? super F > applyTo (MapAttributes <? super F > attrs );
2224
@@ -43,11 +45,7 @@ static <F extends For> Attributes<F> attrs() {
4345
4446 @ SafeVarargs
4547 static <F extends For > Attributes <F > attrs (Attributes <? extends F >... attributes ) {
46- final MapAttributes <F > res = new MapAttributes <>();
47- for (Attributes <? extends F > attribute : attributes ) {
48- attribute .applyTo (res );
49- }
50- return res ;
48+ return attrs (asList (attributes ));
5149 }
5250
5351 static <F extends For > Attributes <F > attrs (List <Attributes <? extends F >> attributes ) {
Original file line number Diff line number Diff line change 2020import javax .annotation .Nullable ;
2121import java .util .*;
2222
23+ import static java .util .Arrays .asList ;
24+
2325public class MutableGraph implements LinkSource , LinkTarget {
2426 protected boolean strict ;
2527 protected boolean directed ;
@@ -89,10 +91,7 @@ public MutableGraph setName(String name) {
8991 }
9092
9193 public MutableGraph add (LinkSource ... sources ) {
92- for (final LinkSource source : sources ) {
93- add (source );
94- }
95- return this ;
94+ return add (asList (sources ));
9695 }
9796
9897 public MutableGraph add (List <? extends LinkSource > sources ) {
Original file line number Diff line number Diff line change 3737
3838class CodeAnalysisTest extends CodeAssertJunit5Test {
3939
40- //TODO un-overwrite as soon as svg salamander is available from maven
41- @ Override
42- protected EnumSet <CodeAssertTestType > defaultTests () {
43- final EnumSet <CodeAssertTestType > types = super .defaultTests ();
44- types .remove (CodeAssertTestType .CIRCULAR_DEPENDENCIES );
45- return types ;
46- }
47-
4840 @ Test
4941 void dependencies () {
5042 assertThat (dependencyResult (), matchesRulesExactly ());
You can’t perform that action at this time.
0 commit comments