diff options
author | Noel Grandin <noel@peralex.com> | 2014-08-20 14:56:25 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2014-10-07 13:20:01 +0200 |
commit | 02ace92aba684238622610776b2c618aa04c7a02 (patch) | |
tree | bc5ad8ece4558a70d6e6e39b1a699fbc47a83c55 /qadevOOo | |
parent | 04ace01ec5f4c18a294a10f68bb42bddda3b29c4 (diff) |
java: optimise calls to toArray
passing in a correctly sized array requires one less allocation
Change-Id: I6198d226d9b630c99c4e8b6e3d0fdf890c495b44
Diffstat (limited to 'qadevOOo')
-rw-r--r-- | qadevOOo/tests/java/complex/unoapi/CheckModuleAPI.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/qadevOOo/tests/java/complex/unoapi/CheckModuleAPI.java b/qadevOOo/tests/java/complex/unoapi/CheckModuleAPI.java index d8d64f11fb99..84c263ec79d4 100644 --- a/qadevOOo/tests/java/complex/unoapi/CheckModuleAPI.java +++ b/qadevOOo/tests/java/complex/unoapi/CheckModuleAPI.java @@ -304,7 +304,7 @@ public class CheckModuleAPI extends ComplexTestCase moduleNames.add(sModuleName); } } - names = moduleNames.toArray(new String[0]); + names = moduleNames.toArray(new String[moduleNames.size()]); } catch (ParameterNotFoundException ex) { @@ -465,7 +465,7 @@ public class CheckModuleAPI extends ComplexTestCase } } - final String[] names = moduleNames.toArray(new String[0]); + final String[] names = moduleNames.toArray(new String[moduleNames.size()]); return names; } |