Use String concatenation instead of StringBuffer/Builder
[yangtools.git] / yang / yang-parser-impl / src / main / java / org / opendaylight / yangtools / yang / parser / stmt / rfc6020 / effective / DeviationEffectiveStatementImpl.java
index e916d3503a2dc0fc1f7065b92efb6c18019a8d57..b66abf8c67bd7aa3fdd00c3bd819fa05b4fed7f4 100644 (file)
@@ -8,7 +8,7 @@
 package org.opendaylight.yangtools.yang.parser.stmt.rfc6020.effective;
 
 import com.google.common.collect.ImmutableList;
-import java.util.LinkedList;
+import java.util.ArrayList;
 import java.util.List;
 import java.util.Objects;
 import org.opendaylight.yangtools.concepts.Immutable;
@@ -20,7 +20,7 @@ import org.opendaylight.yangtools.yang.model.api.stmt.DeviationStatement;
 import org.opendaylight.yangtools.yang.model.api.stmt.SchemaNodeIdentifier;
 import org.opendaylight.yangtools.yang.parser.spi.meta.StmtContext;
 
-public class DeviationEffectiveStatementImpl extends EffectiveStatementBase<SchemaNodeIdentifier, DeviationStatement>
+public class DeviationEffectiveStatementImpl extends DeclaredEffectiveStatementBase<SchemaNodeIdentifier, DeviationStatement>
         implements Deviation, Immutable {
     private final SchemaPath targetPath;
     private final Deviate deviate;
@@ -37,7 +37,7 @@ public class DeviationEffectiveStatementImpl extends EffectiveStatementBase<Sche
         ReferenceEffectiveStatementImpl referenceStmt = firstEffective(ReferenceEffectiveStatementImpl.class);
         this.reference = (referenceStmt == null) ? null : referenceStmt.argument();
 
-        List<UnknownSchemaNode> unknownSchemaNodesInit = new LinkedList<>();
+        List<UnknownSchemaNode> unknownSchemaNodesInit = new ArrayList<>();
         for (final EffectiveStatement<?, ?> effectiveStatement : effectiveSubstatements()) {
             if (effectiveStatement instanceof UnknownSchemaNode) {
                 unknownSchemaNodesInit.add((UnknownSchemaNode) effectiveStatement);
@@ -102,12 +102,10 @@ public class DeviationEffectiveStatementImpl extends EffectiveStatementBase<Sche
 
     @Override
     public String toString() {
-        StringBuilder sb = new StringBuilder(DeviationEffectiveStatementImpl.class.getSimpleName());
-        sb.append("[");
-        sb.append("targetPath=").append(targetPath);
-        sb.append(", deviate=").append(deviate);
-        sb.append(", reference=").append(reference);
-        sb.append("]");
-        return sb.toString();
+        return DeviationEffectiveStatementImpl.class.getSimpleName() + "[" +
+                "targetPath=" + targetPath +
+                ", deviate=" + deviate +
+                ", reference=" + reference +
+                "]";
     }
 }