[Libreoffice-commits] core.git: sfx2/qa
Stephan Bergmann
sbergman at redhat.com
Thu Sep 21 11:51:39 UTC 2017
sfx2/qa/complex/sfx2/DocumentMetadataAccess.java | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
New commits:
commit fafeedc865821b1b0dc25b66afd54757d6440b16
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Thu Sep 21 13:49:26 2017 +0200
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
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)
More information about the Libreoffice-commits
mailing list