diff options
author | Noel Grandin <noel@peralex.com> | 2014-08-06 08:55:09 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2014-08-12 09:41:28 +0200 |
commit | 0477e6c39b7ce8b7f6560fbf222c19fe4f358dc8 (patch) | |
tree | 218eba20dd23c6a865cf01aa7532bf1261a69bc8 /bridges/test | |
parent | e2e55a7c49079dfd896da6515b98d451e4c8735b (diff) |
java: add @Override annotation to overriding methods
Change-Id: I086964c6f6ce52c60c52b6dbc445d3c21d22c80a
Diffstat (limited to 'bridges/test')
-rw-r--r-- | bridges/test/java_remote/Bug107753_Test.java | 3 | ||||
-rw-r--r-- | bridges/test/java_remote/Bug108825_Test.java | 4 | ||||
-rw-r--r-- | bridges/test/java_remote/Bug110892_Test.java | 2 | ||||
-rw-r--r-- | bridges/test/java_remote/Bug111153_Test.java | 2 | ||||
-rw-r--r-- | bridges/test/java_remote/Bug114133_Test.java | 2 | ||||
-rw-r--r-- | bridges/test/java_remote/Bug51323_Test.java | 2 | ||||
-rw-r--r-- | bridges/test/java_remote/Bug92174_Test.java | 2 | ||||
-rw-r--r-- | bridges/test/java_remote/Bug97697_Test.java | 3 | ||||
-rw-r--r-- | bridges/test/java_remote/Bug98508_Test.java | 4 | ||||
-rw-r--r-- | bridges/test/java_remote/MethodIdTest.java | 2 | ||||
-rw-r--r-- | bridges/test/java_remote/PolyStructTest.java | 2 | ||||
-rw-r--r-- | bridges/test/java_remote/StopMessageDispatcherTest.java | 2 | ||||
-rw-r--r-- | bridges/test/java_uno/any/TestAny.java | 12 | ||||
-rw-r--r-- | bridges/test/java_uno/any/TestRemote.java | 1 | ||||
-rw-r--r-- | bridges/test/java_uno/equals/TestEquals.java | 2 | ||||
-rw-r--r-- | bridges/test/java_uno/nativethreadpool/Relay.java | 1 | ||||
-rw-r--r-- | bridges/test/lib/TestBed.java | 2 |
17 files changed, 48 insertions, 0 deletions
diff --git a/bridges/test/java_remote/Bug107753_Test.java b/bridges/test/java_remote/Bug107753_Test.java index e96152cf9d34..06e764b0ebb3 100644 --- a/bridges/test/java_remote/Bug107753_Test.java +++ b/bridges/test/java_remote/Bug107753_Test.java @@ -36,10 +36,12 @@ import test.lib.TestBed; * object, they must have the same hash code.</p> */ public final class Bug107753_Test extends ComplexTestCase { + @Override public String getTestObjectName() { return getClass().getName(); } + @Override public String[] getTestMethodNames() { return new String[] { "test" }; } @@ -54,6 +56,7 @@ public final class Bug107753_Test extends ComplexTestCase { new Client().execute(); } + @Override protected boolean run(XComponentContext context) throws Throwable { boolean success = true; XTransport transport = UnoRuntime.queryInterface( diff --git a/bridges/test/java_remote/Bug108825_Test.java b/bridges/test/java_remote/Bug108825_Test.java index 000270a80c85..e4343c55fcdb 100644 --- a/bridges/test/java_remote/Bug108825_Test.java +++ b/bridges/test/java_remote/Bug108825_Test.java @@ -37,10 +37,12 @@ import test.lib.TestBed; * the code.</p> */ public final class Bug108825_Test extends ComplexTestCase { + @Override public String getTestObjectName() { return getClass().getName(); } + @Override public String[] getTestMethodNames() { return new String[] { "test" }; } @@ -55,6 +57,7 @@ public final class Bug108825_Test extends ComplexTestCase { new Client().execute(); } + @Override protected boolean run(XComponentContext context) throws Throwable { XTest test = UnoRuntime.queryInterface( XTest.class, getBridge(context).getInstance("Test")); @@ -84,6 +87,7 @@ public final class Bug108825_Test extends ComplexTestCase { } private final class Dummy implements XDummy { + @Override protected void finalize() { synchronized (lock) { ++finalizedCount; diff --git a/bridges/test/java_remote/Bug110892_Test.java b/bridges/test/java_remote/Bug110892_Test.java index 3216ea96ef26..e43ea5a0830e 100644 --- a/bridges/test/java_remote/Bug110892_Test.java +++ b/bridges/test/java_remote/Bug110892_Test.java @@ -43,6 +43,7 @@ import test.lib.TestBed; * has not garbage-collected the object by then.</p> */ public final class Bug110892_Test extends ComplexTestCase { + @Override public String[] getTestMethodNames() { return new String[] { "test" }; } @@ -58,6 +59,7 @@ public final class Bug110892_Test extends ComplexTestCase { new Client().execute(); } + @Override protected boolean run(XComponentContext context) throws Throwable { XTest test = UnoRuntime.queryInterface( XTest.class, getBridge(context).getInstance("Test")); diff --git a/bridges/test/java_remote/Bug111153_Test.java b/bridges/test/java_remote/Bug111153_Test.java index d8bfbfa02036..8fe8be0e7314 100644 --- a/bridges/test/java_remote/Bug111153_Test.java +++ b/bridges/test/java_remote/Bug111153_Test.java @@ -36,6 +36,7 @@ import test.lib.TestBed; * short-cutting to the local object.</P> */ public final class Bug111153_Test extends ComplexTestCase { + @Override public String[] getTestMethodNames() { return new String[] { "test" }; } @@ -50,6 +51,7 @@ public final class Bug111153_Test extends ComplexTestCase { new Client().execute(); } + @Override protected boolean run(XComponentContext context) throws Throwable { XTransport t = UnoRuntime.queryInterface( XTransport.class, getBridge(context).getInstance("Transport")); diff --git a/bridges/test/java_remote/Bug114133_Test.java b/bridges/test/java_remote/Bug114133_Test.java index 01a34dc5cb29..84088839bef5 100644 --- a/bridges/test/java_remote/Bug114133_Test.java +++ b/bridges/test/java_remote/Bug114133_Test.java @@ -35,6 +35,7 @@ import test.lib.TestBed; * a fresh, unterminated bridge.</p> */ public final class Bug114133_Test extends ComplexTestCase { + @Override public String[] getTestMethodNames() { return new String[] { "test" }; } @@ -50,6 +51,7 @@ public final class Bug114133_Test extends ComplexTestCase { new Client().execute(); } + @Override protected boolean run(XComponentContext context) throws Throwable { new WaitUnreachable(getBridge(context).getInstance("Test")). waitUnreachable(); diff --git a/bridges/test/java_remote/Bug51323_Test.java b/bridges/test/java_remote/Bug51323_Test.java index bf177fdfc5ff..dc59be6c9551 100644 --- a/bridges/test/java_remote/Bug51323_Test.java +++ b/bridges/test/java_remote/Bug51323_Test.java @@ -36,6 +36,7 @@ import test.lib.TestBed; * create different bridges.</p> */ public final class Bug51323_Test extends ComplexTestCase { + @Override public String[] getTestMethodNames() { return new String[] { "test" }; } @@ -51,6 +52,7 @@ public final class Bug51323_Test extends ComplexTestCase { new Client().execute(); } + @Override protected boolean run(XComponentContext context) throws Throwable { XConnection connection = Connector.create(context).connect(getConnectionDescription()); diff --git a/bridges/test/java_remote/Bug92174_Test.java b/bridges/test/java_remote/Bug92174_Test.java index 2e26ce14cc99..5ddf4b323c52 100644 --- a/bridges/test/java_remote/Bug92174_Test.java +++ b/bridges/test/java_remote/Bug92174_Test.java @@ -28,6 +28,7 @@ import complexlib.ComplexTestCase; import test.lib.TestBed; public final class Bug92174_Test extends ComplexTestCase { + @Override public String[] getTestMethodNames() { return new String[] { "test" }; } @@ -42,6 +43,7 @@ public final class Bug92174_Test extends ComplexTestCase { new Client().execute(); } + @Override protected boolean run(XComponentContext context) throws Throwable { XTransport t = UnoRuntime.queryInterface( XTransport.class, getBridge(context).getInstance("Transport")); diff --git a/bridges/test/java_remote/Bug97697_Test.java b/bridges/test/java_remote/Bug97697_Test.java index fc1173a5e189..233efe116ebf 100644 --- a/bridges/test/java_remote/Bug97697_Test.java +++ b/bridges/test/java_remote/Bug97697_Test.java @@ -41,10 +41,12 @@ import test.lib.TestBed; * considers the process hanging if it has not completed by then.</p> */ public final class Bug97697_Test extends ComplexTestCase { + @Override public String getTestObjectName() { return getClass().getName(); } + @Override public String[] getTestMethodNames() { return new String[] { "test" }; } @@ -59,6 +61,7 @@ public final class Bug97697_Test extends ComplexTestCase { new Client().execute(); } + @Override protected boolean run(XComponentContext context) throws Throwable { XTransport transport = UnoRuntime.queryInterface( XTransport.class, getBridge(context).getInstance("Transport")); diff --git a/bridges/test/java_remote/Bug98508_Test.java b/bridges/test/java_remote/Bug98508_Test.java index b429a8cbb95e..ea0fa7c9a62b 100644 --- a/bridges/test/java_remote/Bug98508_Test.java +++ b/bridges/test/java_remote/Bug98508_Test.java @@ -44,10 +44,12 @@ import test.lib.TestBed; * considers the process hanging if it has not completed by then.</p> */ public final class Bug98508_Test extends ComplexTestCase { + @Override public String getTestObjectName() { return getClass().getName(); } + @Override public String[] getTestMethodNames() { return new String[] { "test" }; } @@ -62,6 +64,7 @@ public final class Bug98508_Test extends ComplexTestCase { new Client().execute(); } + @Override protected boolean run(XComponentContext context) throws Throwable { Test98508Interface ifc = UnoRuntime.queryInterface( @@ -83,6 +86,7 @@ public final class Bug98508_Test extends ComplexTestCase { public Object getInstance(String instanceName) { return new Test98508Interface() { + @Override public Test98508Struct get() { testBed.serverDone(true); return new Test98508Struct(Boolean.FALSE); diff --git a/bridges/test/java_remote/MethodIdTest.java b/bridges/test/java_remote/MethodIdTest.java index 537cb66965f1..212fc3b7ecc8 100644 --- a/bridges/test/java_remote/MethodIdTest.java +++ b/bridges/test/java_remote/MethodIdTest.java @@ -36,6 +36,7 @@ import test.lib.TestBed; * short-cutting to the local object.</P> */ public final class MethodIdTest extends ComplexTestCase { + @Override public String[] getTestMethodNames() { return new String[] { "test" }; } @@ -51,6 +52,7 @@ public final class MethodIdTest extends ComplexTestCase { new Client().execute(); } + @Override protected boolean run(XComponentContext context) throws Throwable { XTest t = UnoRuntime.queryInterface( XTest.class, getBridge(context).getInstance("Test")); diff --git a/bridges/test/java_remote/PolyStructTest.java b/bridges/test/java_remote/PolyStructTest.java index 146d14fea644..c0b2e9b22a44 100644 --- a/bridges/test/java_remote/PolyStructTest.java +++ b/bridges/test/java_remote/PolyStructTest.java @@ -27,6 +27,7 @@ import complexlib.ComplexTestCase; import test.lib.TestBed; public final class PolyStructTest extends ComplexTestCase { + @Override public String[] getTestMethodNames() { return new String[] { "test" }; } @@ -42,6 +43,7 @@ public final class PolyStructTest extends ComplexTestCase { new Client().execute(); } + @Override protected boolean run(XComponentContext context) throws Throwable { TestTransport t = UnoRuntime.queryInterface( TestTransport.class, getBridge(context).getInstance("")); diff --git a/bridges/test/java_remote/StopMessageDispatcherTest.java b/bridges/test/java_remote/StopMessageDispatcherTest.java index d1c6a3654a8b..4d62fa297ccf 100644 --- a/bridges/test/java_remote/StopMessageDispatcherTest.java +++ b/bridges/test/java_remote/StopMessageDispatcherTest.java @@ -35,6 +35,7 @@ import test.lib.TestBed; public final class StopMessageDispatcherTest extends ComplexTestCase { public StopMessageDispatcherTest() {} + @Override public String[] getTestMethodNames() { return new String[] { "test" }; } @@ -50,6 +51,7 @@ public final class StopMessageDispatcherTest extends ComplexTestCase { new Client().execute(); } + @Override protected boolean run(XComponentContext context) throws Throwable { XTest test = UnoRuntime.queryInterface( XTest.class, getBridge(context).getInstance("Test")); diff --git a/bridges/test/java_uno/any/TestAny.java b/bridges/test/java_uno/any/TestAny.java index 956c07c171bb..d77e866f64a6 100644 --- a/bridges/test/java_uno/any/TestAny.java +++ b/bridges/test/java_uno/any/TestAny.java @@ -2095,6 +2095,7 @@ final class TestAny { this.unboxInner = unboxInner; } + @Override public boolean equal(Object o1, Object o2) { if (o1 instanceof Any) { return o2 instanceof Any @@ -2141,6 +2142,7 @@ final class TestAny { this.unboxInner = unboxInner; } + @Override public boolean equal(Object o1, Object o2) { return new CompareBoxed(unboxInner).equal(((Any) o1).getObject(), o2); @@ -2154,6 +2156,7 @@ final class TestAny { this.specific = specific; } + @Override public boolean equal(Object o1, Object o2) { return new CompareBoxed().equal(specific, o2); } @@ -2166,6 +2169,7 @@ final class TestAny { this.clazz = clazz; } + @Override public boolean equal(Object o1, Object o2) { return o2 != null && o2.getClass() == clazz; } @@ -2182,24 +2186,28 @@ final class TestAny { return new Enum1(); } + @Override public boolean equals(Object obj) { return obj != null && obj.getClass() == Enum1.class; } } public static class Enum2 extends Enum1 { + @Override public boolean equals(Object obj) { return obj != null && obj.getClass() == Enum2.class; } } public static class BaseStruct { + @Override public boolean equals(Object obj) { return obj != null && obj.getClass() == BaseStruct.class; } } public static class DerivedStruct extends BaseStruct { + @Override public boolean equals(Object obj) { return obj != null && obj.getClass() == DerivedStruct.class; } @@ -2212,6 +2220,7 @@ final class TestAny { super(message); } + @Override public boolean equals(Object obj) { return obj != null && obj.getClass() == BaseException.class; } @@ -2224,6 +2233,7 @@ final class TestAny { super(message); } + @Override public boolean equals(Object obj) { return obj != null && obj.getClass() == DerivedException.class; } @@ -2238,6 +2248,7 @@ final class TestAny { super(message); } + @Override public boolean equals(Object obj) { return obj != null && obj.getClass() == BaseRuntimeException.class; @@ -2252,6 +2263,7 @@ final class TestAny { super(message); } + @Override public boolean equals(Object obj) { return obj != null && obj.getClass() == DerivedRuntimeException.class; diff --git a/bridges/test/java_uno/any/TestRemote.java b/bridges/test/java_uno/any/TestRemote.java index 9dd2aaa28d3b..15226c37e295 100644 --- a/bridges/test/java_uno/any/TestRemote.java +++ b/bridges/test/java_uno/any/TestRemote.java @@ -39,6 +39,7 @@ public final class TestRemote { new Client().execute(); } + @Override protected boolean run(XComponentContext context) throws Throwable { XTransport transport = UnoRuntime.queryInterface( XTransport.class, getBridge(context).getInstance("Transport")); diff --git a/bridges/test/java_uno/equals/TestEquals.java b/bridges/test/java_uno/equals/TestEquals.java index 4775f2c9695a..5e6c49023c32 100644 --- a/bridges/test/java_uno/equals/TestEquals.java +++ b/bridges/test/java_uno/equals/TestEquals.java @@ -79,6 +79,7 @@ public final class TestEquals { new Client().execute(); } + @Override protected boolean run(XComponentContext context) throws Throwable { XTestFrame f = UnoRuntime.queryInterface( XTestFrame.class, getBridge(context).getInstance("TestFrame")); @@ -146,6 +147,7 @@ public final class TestEquals { final Object object2) { new Thread() { + @Override public void run() { try { Object test1Aa = object1; diff --git a/bridges/test/java_uno/nativethreadpool/Relay.java b/bridges/test/java_uno/nativethreadpool/Relay.java index d15d0d4b8ef2..8e371b203957 100644 --- a/bridges/test/java_uno/nativethreadpool/Relay.java +++ b/bridges/test/java_uno/nativethreadpool/Relay.java @@ -58,6 +58,7 @@ public final class Relay implements XRelay, XSource { throw new WrappedTargetRuntimeException(e.toString(), this, e); } new Thread() { + @Override public void run() { try { // Use "127.0.0.1" instead of "localhost", see #i32281#: diff --git a/bridges/test/lib/TestBed.java b/bridges/test/lib/TestBed.java index 17eb4751c836..4f6bf13621d3 100644 --- a/bridges/test/lib/TestBed.java +++ b/bridges/test/lib/TestBed.java @@ -84,6 +84,7 @@ public final class TestBed { private void pipe(final InputStream in, final PrintStream out, final String prefix) { new Thread("Pipe: " + prefix) { + @Override public void run() { BufferedReader r = new BufferedReader(new InputStreamReader(in)); @@ -151,6 +152,7 @@ public final class TestBed { this.provider = provider; } + @Override public void run() { try { XComponentContext context |