From 26b4f5be815bc7c77deb3d38d23b51c9dea9fcd1 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Tue, 9 Jun 2015 10:59:59 +0200 Subject: java:use System.arrayCopy to copy arrays instead of a for loop Change-Id: I3fbd92c5f96970543c2da3843e54a733bf811e72 --- odk/source/com/sun/star/lib/loader/Loader.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'odk/source') diff --git a/odk/source/com/sun/star/lib/loader/Loader.java b/odk/source/com/sun/star/lib/loader/Loader.java index 787ccbb48b33..750f0b792048 100644 --- a/odk/source/com/sun/star/lib/loader/Loader.java +++ b/odk/source/com/sun/star/lib/loader/Loader.java @@ -218,9 +218,7 @@ public final class Loader { return; } byte[] buf2 = new byte[2 * n]; - for (int i = 0; i < n; ++i) { - buf2[i] = buf[i]; - } + System.arraycopy(buf, 0, buf2, 0, n); buf = buf2; } int k = s.read(buf, n, buf.length - n); -- cgit v1.2.3