diff options
author | Noel Grandin <noel@peralex.com> | 2012-06-28 11:01:03 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2012-06-29 22:03:02 +0200 |
commit | 4418ad0388b58cab6a129908f78baec5bc73906e (patch) | |
tree | 1cdb694c9bc5fef83440006dd4464668d9552c42 /ridljar/test | |
parent | 30d4c3c7ce75ed2180a439c2a3526dae7f4660d5 (diff) |
Java5 update - convert code to use generics
Note that WeakMap no longer extends Map, because it does not conform
to the generic Map interface.
Change-Id: I72ea681528c932d84c95f095434e1dc95b0a3d16
Diffstat (limited to 'ridljar/test')
-rw-r--r-- | ridljar/test/com/sun/star/lib/util/WeakMap_Test.java | 2 | ||||
-rw-r--r-- | ridljar/test/com/sun/star/uno/UnoRuntime_Test.java | 5 |
2 files changed, 4 insertions, 3 deletions
diff --git a/ridljar/test/com/sun/star/lib/util/WeakMap_Test.java b/ridljar/test/com/sun/star/lib/util/WeakMap_Test.java index 00e03a6c22ff..378a1ac78777 100644 --- a/ridljar/test/com/sun/star/lib/util/WeakMap_Test.java +++ b/ridljar/test/com/sun/star/lib/util/WeakMap_Test.java @@ -24,7 +24,7 @@ import static org.junit.Assert.*; public final class WeakMap_Test { @Test public void test() { - WeakMap m = new WeakMap(); + WeakMap<String,Object> m = new WeakMap<String,Object>(); assertEquals(0, m.size()); assertTrue(m.isEmpty()); assertFalse(m.containsKey("key1")); diff --git a/ridljar/test/com/sun/star/uno/UnoRuntime_Test.java b/ridljar/test/com/sun/star/uno/UnoRuntime_Test.java index 3bc375af0a96..cfc773f5296f 100644 --- a/ridljar/test/com/sun/star/uno/UnoRuntime_Test.java +++ b/ridljar/test/com/sun/star/uno/UnoRuntime_Test.java @@ -71,10 +71,10 @@ public final class UnoRuntime_Test { UnoRuntime.areSame( new Any( new Type("com.sun.star.beans.Optional<unsigned long>"), - new Optional()), + new Optional<Integer>()), new Any( new Type("com.sun.star.beans.Optional<unsigned long>"), - new Optional(false, new Integer(0))))); + new Optional<Integer>(false, new Integer(0))))); assertFalse(UnoRuntime.areSame(new Test1(), new Test2())); Test2 test2 = new Test2(); assertTrue( @@ -83,6 +83,7 @@ public final class UnoRuntime_Test { UnoRuntime.queryInterface(Ifc.class, test2), test2)); } + @SuppressWarnings("rawtypes") @Test public void test_completeValue() { assertEquals( new Integer(0), UnoRuntime.completeValue(Type.UNSIGNED_LONG, null)); |