summaryrefslogtreecommitdiff
path: root/sfx2/qa
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2017-09-21 13:49:26 +0200
committerStephan Bergmann <sbergman@redhat.com>2017-09-21 13:49:26 +0200
commitfafeedc865821b1b0dc25b66afd54757d6440b16 (patch)
tree74cfa9b2faf37402453b16912afaeac5d1d56a63 /sfx2/qa
parentf000bb2a23afba29797e6f187a8108266b01e620 (diff)
Fix creation of array clone
The original code caused ClassCastException when the return value of toArray() was actually of type Object[] instead of Statement[]. Change-Id: I6cd451404b7bd22a9a0c3490b6982cc38e79d1b2
Diffstat (limited to 'sfx2/qa')
-rw-r--r--sfx2/qa/complex/sfx2/DocumentMetadataAccess.java3
1 files changed, 1 insertions, 2 deletions
diff --git a/sfx2/qa/complex/sfx2/DocumentMetadataAccess.java b/sfx2/qa/complex/sfx2/DocumentMetadataAccess.java
index 4c23235c3baf..9a0e7b8170a7 100644
--- a/sfx2/qa/complex/sfx2/DocumentMetadataAccess.java
+++ b/sfx2/qa/complex/sfx2/DocumentMetadataAccess.java
@@ -1006,8 +1006,7 @@ public class DocumentMetadataAccess
i_Expected.length);
return false;
}
- Statement[] expected = (Statement[])
- java.util.Arrays.asList(i_Expected).toArray();
+ Statement[] expected = i_Expected.clone();
java.util.Arrays.sort(i_Result, new StmtComp());
java.util.Arrays.sort(expected, new StmtComp());
for (int i = 0; i < expected.length; ++i)