diff --git a/src/main/java/li/cil/oc2/common/bus/device/rpc/RPCDeviceList.java b/src/main/java/li/cil/oc2/common/bus/device/rpc/RPCDeviceList.java index 11aa983b..66d44867 100644 --- a/src/main/java/li/cil/oc2/common/bus/device/rpc/RPCDeviceList.java +++ b/src/main/java/li/cil/oc2/common/bus/device/rpc/RPCDeviceList.java @@ -10,17 +10,17 @@ import java.util.Objects; import java.util.stream.Collectors; public final class RPCDeviceList implements RPCDevice { - private final ArrayList deviceInterfaces; + private final ArrayList devices; /////////////////////////////////////////////////////////////////// - public RPCDeviceList(final ArrayList deviceInterfaces) { - this.deviceInterfaces = deviceInterfaces; + public RPCDeviceList(final ArrayList devices) { + this.devices = devices; } @Override public List getTypeNames() { - return deviceInterfaces.stream() + return devices.stream() .map(RPCDevice::getTypeNames) .flatMap(Collection::stream) .collect(Collectors.toList()); @@ -28,7 +28,7 @@ public final class RPCDeviceList implements RPCDevice { @Override public List getMethods() { - return deviceInterfaces.stream() + return devices.stream() .map(RPCDevice::getMethods) .flatMap(Collection::stream) .collect(Collectors.toList()); @@ -39,11 +39,11 @@ public final class RPCDeviceList implements RPCDevice { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; final RPCDeviceList that = (RPCDeviceList) o; - return deviceInterfaces.equals(that.deviceInterfaces); + return devices.equals(that.devices); } @Override public int hashCode() { - return Objects.hash(deviceInterfaces); + return Objects.hash(devices); } } diff --git a/src/test/java/li/cil/oc2/common/vm/RPCAdapterTests.java b/src/test/java/li/cil/oc2/common/vm/RPCAdapterTests.java index 5cb7a0a3..fb7f1123 100644 --- a/src/test/java/li/cil/oc2/common/vm/RPCAdapterTests.java +++ b/src/test/java/li/cil/oc2/common/vm/RPCAdapterTests.java @@ -41,7 +41,7 @@ public class RPCAdapterTests { @Test public void resetAndReadDescriptor() { final VoidIntMethod method = new VoidIntMethod(); - final TestRPCDeviceInterface device = new TestRPCDeviceInterface(method); + final TestRPCDevice device = new TestRPCDevice(method); setDevice(device, DEVICE_UUID); final JsonObject request = new JsonObject(); @@ -66,7 +66,7 @@ public class RPCAdapterTests { @Test public void simpleMethod() { final VoidIntMethod method = new VoidIntMethod(); - final TestRPCDeviceInterface device = new TestRPCDeviceInterface(method); + final TestRPCDevice device = new TestRPCDevice(method); setDevice(device, DEVICE_UUID); invokeMethod(DEVICE_UUID, method.getName(), 0xdeadbeef); @@ -77,7 +77,7 @@ public class RPCAdapterTests { @Test public void returningMethod() { final IntLongMethod method = new IntLongMethod(); - final TestRPCDeviceInterface device = new TestRPCDeviceInterface(method); + final TestRPCDevice device = new TestRPCDevice(method); setDevice(device, DEVICE_UUID); final JsonElement result = invokeMethod(DEVICE_UUID, method.getName(), 0xdeadbeefcafebabeL); @@ -220,10 +220,10 @@ public class RPCAdapterTests { } } - private static final class TestRPCDeviceInterface implements RPCDevice { + private static final class TestRPCDevice implements RPCDevice { private final RPCMethod method; - public TestRPCDeviceInterface(final RPCMethod method) { + public TestRPCDevice(final RPCMethod method) { this.method = method; }