mirror of https://github.com/apache/maven.git
[MNG-7899] Various memory usage improvements
Avoid creating a StringBuilder instance when not needed to reduce temporary objects creation
This commit is contained in:
parent
e4f68f037d
commit
0353476b1c
|
@ -400,10 +400,10 @@ public class MetadataGraph {
|
|||
// ------------------------------------------------------------------------
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder(512);
|
||||
if (isEmpty()) {
|
||||
return "empty";
|
||||
}
|
||||
StringBuilder sb = new StringBuilder(512);
|
||||
for (MetadataGraphVertex v : vertices) {
|
||||
sb.append("Vertex: ").append(v.getMd().toString()).append('\n');
|
||||
List<MetadataGraphEdge> ins = getIncidentEdges(v);
|
||||
|
|
Loading…
Reference in New Issue