From fef9997edf8606f67a82976e4783ba3f75a98881 Mon Sep 17 00:00:00 2001 From: Jano Svitok Date: Mon, 6 Aug 2018 12:53:03 +0200 Subject: [PATCH] Performance: Make inner classes static --- test/se/vidstige/jadb/test/fakes/FakeAdbServer.java | 6 +++--- test/se/vidstige/jadb/test/fakes/FakeSubprocess.java | 2 +- test/se/vidstige/jadb/test/unit/PackageManagerTest.java | 2 +- test/se/vidstige/jadb/test/unit/PropertyManagerTest.java | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/test/se/vidstige/jadb/test/fakes/FakeAdbServer.java b/test/se/vidstige/jadb/test/fakes/FakeAdbServer.java index 63ee5d1..a0c6db4 100644 --- a/test/se/vidstige/jadb/test/fakes/FakeAdbServer.java +++ b/test/se/vidstige/jadb/test/fakes/FakeAdbServer.java @@ -91,7 +91,7 @@ public class FakeAdbServer implements AdbResponder { return new ArrayList(devices); } - private class DeviceResponder implements AdbDeviceResponder { + private static class DeviceResponder implements AdbDeviceResponder { private final String serial; private final String type; private List fileExpectations = new ArrayList(); @@ -155,7 +155,7 @@ public class FakeAdbServer implements AdbResponder { org.junit.Assert.assertEquals(0, shellExpectations.size()); } - private class FileExpectation implements ExpectationBuilder { + private static class FileExpectation implements ExpectationBuilder { private final RemoteFile path; private byte[] content; private String failMessage; @@ -199,7 +199,7 @@ public class FakeAdbServer implements AdbResponder { } } - public class ShellExpectation { + public static class ShellExpectation { private final String command; private byte[] stdout; diff --git a/test/se/vidstige/jadb/test/fakes/FakeSubprocess.java b/test/se/vidstige/jadb/test/fakes/FakeSubprocess.java index a09556b..f616962 100644 --- a/test/se/vidstige/jadb/test/fakes/FakeSubprocess.java +++ b/test/se/vidstige/jadb/test/fakes/FakeSubprocess.java @@ -48,7 +48,7 @@ public class FakeSubprocess extends Subprocess { } } - private class Expectation { + private static class Expectation { private final String[] command; private final int exitValue; diff --git a/test/se/vidstige/jadb/test/unit/PackageManagerTest.java b/test/se/vidstige/jadb/test/unit/PackageManagerTest.java index 4f72f47..65b3d43 100644 --- a/test/se/vidstige/jadb/test/unit/PackageManagerTest.java +++ b/test/se/vidstige/jadb/test/unit/PackageManagerTest.java @@ -15,7 +15,7 @@ import java.util.List; import static org.junit.Assert.assertEquals; public class PackageManagerTest { - private final String DEVICE_SERIAL = "serial-123"; + private static final String DEVICE_SERIAL = "serial-123"; private FakeAdbServer server; private JadbConnection connection; diff --git a/test/se/vidstige/jadb/test/unit/PropertyManagerTest.java b/test/se/vidstige/jadb/test/unit/PropertyManagerTest.java index 1b59874..d97ae3c 100644 --- a/test/se/vidstige/jadb/test/unit/PropertyManagerTest.java +++ b/test/se/vidstige/jadb/test/unit/PropertyManagerTest.java @@ -14,7 +14,7 @@ import java.util.Map; import static org.junit.Assert.assertEquals; public class PropertyManagerTest { - private final String DEVICE_SERIAL = "serial-123"; + private static final String DEVICE_SERIAL = "serial-123"; private FakeAdbServer server; private JadbConnection connection;