YangResource should be a record
[netconf.git] / netconf / tools / netconf-testtool / src / main / java / org / opendaylight / netconf / test / tool / NetconfDeviceSimulator.java
index b40938347f4baa844b8fa542fe930a54222dbeb5..61fb0d0bc75a015304ba5efc8ffb6226b6843298 100644 (file)
@@ -87,8 +87,8 @@ public class NetconfDeviceSimulator implements Closeable {
 
     public NetconfDeviceSimulator(final Configuration configuration) {
         this.configuration = configuration;
-        this.servers = new ArrayList<>(configuration.getDeviceCount());
-        this.sshTransportStackFactory = new SSHTransportStackFactory("netconf-device-simulator-threads",
+        servers = new ArrayList<>(configuration.getDeviceCount());
+        sshTransportStackFactory = new SSHTransportStackFactory("netconf-device-simulator-threads",
             configuration.getThreadPoolSize());
         hashedWheelTimer = new HashedWheelTimer();
     }
@@ -271,8 +271,7 @@ public class NetconfDeviceSimulator implements Closeable {
         }
 
         configuration.getDefaultYangResources().forEach(r -> {
-            final SourceIdentifier sourceIdentifier = new SourceIdentifier(r.getModuleName(), r.getRevision());
-            registerSource(consumer, r.getResourcePath(), sourceIdentifier);
+            registerSource(consumer, r.resourcePath(), new SourceIdentifier(r.moduleName(), r.revision()));
         });
 
         try {