summaryrefslogtreecommitdiff
path: root/ridljar/test
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2016-05-13 19:19:32 +0200
committerStephan Bergmann <sbergman@redhat.com>2016-05-13 19:28:56 +0200
commit5b78551dcf54158adffe3236a45946942af5f354 (patch)
treed7786aea5864674e68ad5a277b9d0d5aafbb7992 /ridljar/test
parent86ab6471520a5300df2b8bc577987550362f4921 (diff)
Related tdf#99272: Prevent bogus com.sun.star.uno.Type(Short[].class) etc.
...so that the JNI UNO bridge will not accidentally reinterpret a Short[] as a short[]. <https://wiki.openoffice.org/wiki/Uno/Java/Specifications/Type_Mapping> makes it clear that the former is not a valid Java representation for UNO type "sequence of short". Needed one fix in bogus test code. Also fixed the two bogus places in odk/examples mentioned in f53e427291321eabe8d060a737e750a94739f911 "Resolves: tdf#99272 new Short[] used instead of new short[]". Change-Id: I8321eb1294ec77b3a9bf73cafb6e7fe337157bb7
Diffstat (limited to 'ridljar/test')
-rw-r--r--ridljar/test/com/sun/star/uno/Type_Test.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/ridljar/test/com/sun/star/uno/Type_Test.java b/ridljar/test/com/sun/star/uno/Type_Test.java
index e81142c64ac0..1499b8230e4b 100644
--- a/ridljar/test/com/sun/star/uno/Type_Test.java
+++ b/ridljar/test/com/sun/star/uno/Type_Test.java
@@ -76,7 +76,11 @@ public final class Type_Test {
assertSame(boolean.class, new Type(boolean.class).getZClass());
assertSame(boolean.class, new Type(Boolean.class).getZClass());
assertSame(boolean[].class, new Type(boolean[].class).getZClass());
- assertSame(boolean[].class, new Type(Boolean[].class).getZClass());
+
+ try {
+ new Type(Boolean[].class);
+ fail();
+ } catch (java.lang.RuntimeException e) {}
}
@Test public void testIsSupertypeOf() {