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/java_uno | |
parent | e2e55a7c49079dfd896da6515b98d451e4c8735b (diff) |
java: add @Override annotation to overriding methods
Change-Id: I086964c6f6ce52c60c52b6dbc445d3c21d22c80a
Diffstat (limited to 'bridges/test/java_uno')
-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 |
4 files changed, 16 insertions, 0 deletions
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#: |