Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id DC31C200D16 for ; Tue, 26 Sep 2017 03:49:24 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id DAD5B1609E9; Tue, 26 Sep 2017 01:49:24 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 1BDB91609BB for ; Tue, 26 Sep 2017 03:49:23 +0200 (CEST) Received: (qmail 69000 invoked by uid 500); 26 Sep 2017 01:49:23 -0000 Mailing-List: contact derby-dev-help@db.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: Delivered-To: mailing list derby-dev@db.apache.org Received: (qmail 68976 invoked by uid 99); 26 Sep 2017 01:49:22 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 26 Sep 2017 01:49:22 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 667AADD3B1 for ; Tue, 26 Sep 2017 01:49:22 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.099 X-Spam-Level: * X-Spam-Status: No, score=1.099 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=2, KAM_LIVE=1, KAM_NUMSUBJECT=0.5, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-2.8, RCVD_IN_SORBS_SPAM=0.5, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd1-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id d-Lmnd72XJqB for ; Tue, 26 Sep 2017 01:49:21 +0000 (UTC) Received: from mail-io0-f174.google.com (mail-io0-f174.google.com [209.85.223.174]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id 219805FDB8 for ; Tue, 26 Sep 2017 01:49:21 +0000 (UTC) Received: by mail-io0-f174.google.com with SMTP id l15so11448390iol.8 for ; Mon, 25 Sep 2017 18:49:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=pi7QsMxe51cqo/pV+VenySIz+4kMGzAa4at6iekz10o=; b=sj13QuJ3wDoV56UOErNBwa7J6BI9x0yhtuxy4eYS8XK6KNkfEw3fypyeYpHi8qUddD Wt6Ha8xcSe71a2uxMgaEIVBADb0rxiqOkDd9upbyI72z9ggalmcpTYfF4EM+qK+7Y05k A/LGHBASKn+9QpEwWvM+Zgp9IGmt6dJ4D7n5UCBijipbcersiQWIiooIc9/LZS4Si7AO DibEyJbvdHLCJqFyUv5yZSPiu6fitmnCXb0QesJbMMmxEZnK59ems+okHHNDp0xQN93t UzcCwm0SAtiqlDqbMwQkcJCCmS7UYuCR9M7yC3y/J0zHIV2HPOPBv7nAZ7Jtx5H0PGRY bhCw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=pi7QsMxe51cqo/pV+VenySIz+4kMGzAa4at6iekz10o=; b=HvCZ1txmSE7t1j+vOgwVgkpLI0AJ8170sj4satYmHHEv+/Zg3CT9x6JdcgVn9w5Jwi YxaFXE3O/WuJsi0spK82bCgef/AEzHliXkG7LFk7IvI6ca6D6yrw1MXmDwm2f2+spTQC KzKyiN/+ohpANcEqGCQmhrB631Lju/SgR+6lYXipCJJpX47YjI0TTkl6+zU0vr3j6QHx tf7iDdnaNKXdS28OVehia8Q6ha+0L87VIKtpEG01F1wEOcBHILGPZRM/9hnbwZZQJfrs vyZhhgrIFKm2UPc+FF3chZlS5qd8qbZX9CQogO8fPCFiVIyfvfgWTn7j2Wj6RyjQ4YHx SNwA== X-Gm-Message-State: AHPjjUg/4nq/kzcWDMZsdQtr3ooRmZUGWh095o0JcYgDK3nj5XHD9SBQ /jPbdNnQnNrslsAhq+4yGGb6CVwKTPrgfUwxSp9jeA== X-Google-Smtp-Source: AOwi7QA8AAI1+DUj3HlsvJFMpMxKDP7wZ64+pNWA6b+U3gLxf1vqKqyp/dQvKmY600Fa0yCO1eLu+49E7HTorwo6+08= X-Received: by 10.107.154.71 with SMTP id c68mr12637121ioe.95.1506390560286; Mon, 25 Sep 2017 18:49:20 -0700 (PDT) MIME-Version: 1.0 Received: by 10.36.196.131 with HTTP; Mon, 25 Sep 2017 18:49:19 -0700 (PDT) In-Reply-To: References: From: Bryan Pendleton Date: Mon, 25 Sep 2017 18:49:19 -0700 Message-ID: Subject: Re: Regarding DERBY-5538 To: derby-dev@db.apache.org Content-Type: multipart/alternative; boundary="001a1140f9023d2ef0055a0de298" archived-at: Tue, 26 Sep 2017 01:49:25 -0000 --001a1140f9023d2ef0055a0de298 Content-Type: text/plain; charset="UTF-8" The crucial difference between using String, and using char[], is that the String cannot be changed after we are done using it, while the char[] array can be changed once we are done using it. So it's not *just* changing from String to char[], it's *also* clearing the character array after we are done using it, so it doesn't stick around in memory unnecessarily. Here's a more detailed explanation: http://securesoftware.blogspot.com/2009/01/java-security-why-not-to-use-string.html thanks, bryan --001a1140f9023d2ef0055a0de298 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
The crucial difference between = using String, and using char[], is that the String cannot be changed after = we are done using it, while the char[] array can be changed once we are don= e using it.

So it's not *just* changing from String to char[], it's *also= * clearing the character array after we are done using it, so it doesn'= t stick around in memory unnecessarily.
thanks,
<= br>
bryan
<= br>
--001a1140f9023d2ef0055a0de298--