Skip to content
Snippets Groups Projects
Commit ff5e5f36 authored by Sören Henning's avatar Sören Henning
Browse files

avoid empty "node []" and "edge []"

parent 8bff34eb
No related branches found
No related tags found
1 merge request!17Get impletemented stages and Java 8
Pipeline #
......@@ -62,13 +62,17 @@ public class DotGraphWriter {
public void addDefaultNodeAttributes(final Map<String, String> attributes) throws IOException {
checkState(DotWriterState.STARTED);
writer.writeln(DotGraph.NODE + ' ' + assembleAttributes(attributes));
if (attributes != null && !attributes.isEmpty()) {
writer.writeln(DotGraph.NODE + ' ' + assembleAttributes(attributes));
}
}
public void addDefaultEdgeAttributes(final Map<String, String> attributes) throws IOException {
checkState(DotWriterState.STARTED);
writer.writeln(DotGraph.EDGE + ' ' + assembleAttributes(attributes));
if (attributes != null && !attributes.isEmpty()) {
writer.writeln(DotGraph.EDGE + ' ' + assembleAttributes(attributes));
}
}
public void addGraphAttribute(final String key, final String value) throws IOException {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment