Use String concatenation instead of StringBuffer/Builder
[yangtools.git] / yang / yang-parser-impl / src / main / java / org / opendaylight / yangtools / yang / parser / stmt / rfc6020 / effective / UsesEffectiveStatementImpl.java
index 421c11153c541bb3a08ef0f3f296ab8eb0d28988..aec4f83b7b56836cd6d9925dc7a96fb5d30b9885 100644 (file)
@@ -31,9 +31,8 @@ import org.opendaylight.yangtools.yang.model.api.stmt.UsesStatement;
 import org.opendaylight.yangtools.yang.parser.spi.GroupingNamespace;
 import org.opendaylight.yangtools.yang.parser.spi.meta.StmtContext;
 import org.opendaylight.yangtools.yang.parser.spi.meta.StmtContext.TypeOfCopy;
-import org.opendaylight.yangtools.yang.parser.stmt.rfc6020.Utils;
 
-public final class UsesEffectiveStatementImpl extends EffectiveStatementBase<QName, UsesStatement> implements UsesNode {
+public final class UsesEffectiveStatementImpl extends DeclaredEffectiveStatementBase<QName, UsesStatement> implements UsesNode {
     private final SchemaPath groupingPath;
     private final boolean addedByUses;
     private final Map<SchemaPath, SchemaNode> refines;
@@ -47,7 +46,7 @@ public final class UsesEffectiveStatementImpl extends EffectiveStatementBase<QNa
         // initGroupingPath
         StmtContext<?, GroupingStatement, EffectiveStatement<QName, GroupingStatement>> grpCtx = ctx.getFromNamespace(
                 GroupingNamespace.class, ctx.getStatementArgument());
-        this.groupingPath = Utils.getSchemaPath(grpCtx);
+        this.groupingPath = grpCtx.getSchemaPath().get();
 
         // initCopyType
         List<TypeOfCopy> copyTypesFromOriginal = ctx.getCopyHistory();
@@ -137,10 +136,8 @@ public final class UsesEffectiveStatementImpl extends EffectiveStatementBase<QNa
 
     @Override
     public String toString() {
-        StringBuilder sb = new StringBuilder(UsesEffectiveStatementImpl.class.getSimpleName());
-        sb.append("[groupingPath=");
-        sb.append(groupingPath);
-        sb.append("]");
-        return sb.toString();
+        return UsesEffectiveStatementImpl.class.getSimpleName() + "[groupingPath=" +
+                groupingPath +
+                "]";
     }
 }