diff options
author | jan iversen <jani@documentfoundation.org> | 2016-01-21 19:54:46 +0100 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2016-01-22 09:07:53 +0000 |
commit | e39bf3677109976cae13e1bdff044e2d5769c098 (patch) | |
tree | 468417a3d8892da8c9bc62a7268c0cd8bdbc34d4 | |
parent | d90a20833a815362c344b82fc16b4bbcff0ebf07 (diff) |
cid#1326191, 1326202
Null references elements, introduced throw
Change-Id: I22bf7de5f20c3ca455df31de2a5d7301b436ed82
Reviewed-on: https://gerrit.libreoffice.org/21691
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
-rw-r--r-- | jurt/com/sun/star/lib/uno/protocols/urp/urp.java | 4 | ||||
-rw-r--r-- | qadevOOo/tests/java/ifc/accessibility/_XAccessibleText.java | 7 |
2 files changed, 10 insertions, 1 deletions
diff --git a/jurt/com/sun/star/lib/uno/protocols/urp/urp.java b/jurt/com/sun/star/lib/uno/protocols/urp/urp.java index 5e7b3288866c..cea15dbf1b2b 100644 --- a/jurt/com/sun/star/lib/uno/protocols/urp/urp.java +++ b/jurt/com/sun/star/lib/uno/protocols/urp/urp.java @@ -619,8 +619,10 @@ public final class urp implements IProtocol { for (int i = releaseQueue.size(); i > 0;) { --i; QueuedRelease r = releaseQueue.get(i); + if (r == null) + throw new IOException("releaseQueue unexpected empty"); writeRequest( - r.internal, r.objectId, r.type, r.method, r.threadId, null, + r.internal, r.objectId, r.type, r.method, r.threadId, null, false); releaseQueue.remove(i); } diff --git a/qadevOOo/tests/java/ifc/accessibility/_XAccessibleText.java b/qadevOOo/tests/java/ifc/accessibility/_XAccessibleText.java index 9f4f5c090450..92082d34bc79 100644 --- a/qadevOOo/tests/java/ifc/accessibility/_XAccessibleText.java +++ b/qadevOOo/tests/java/ifc/accessibility/_XAccessibleText.java @@ -475,8 +475,15 @@ public class _XAccessibleText extends MultiMethodTest { } catch (com.sun.star.lang.IllegalArgumentException e) { } + if (aRect == null) { + res = false; + log.print("aRect unexpected null"); + break; + } + int x = aRect.X + (aRect.Width / 2); int y = aRect.Y + (aRect.Height / 2); + Point aPoint = new Point(x, y); int nIndex = oObj.getIndexAtPoint(aPoint); |