Return-Path: Delivered-To: apmail-incubator-harmony-dev-archive@www.apache.org Received: (qmail 83025 invoked from network); 15 Feb 2006 05:08:57 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 15 Feb 2006 05:08:57 -0000 Received: (qmail 35677 invoked by uid 500); 15 Feb 2006 05:08:54 -0000 Delivered-To: apmail-incubator-harmony-dev-archive@incubator.apache.org Received: (qmail 35357 invoked by uid 500); 15 Feb 2006 05:08:52 -0000 Mailing-List: contact harmony-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: harmony-dev@incubator.apache.org Delivered-To: mailing list harmony-dev@incubator.apache.org Received: (qmail 35346 invoked by uid 99); 15 Feb 2006 05:08:52 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 14 Feb 2006 21:08:52 -0800 X-ASF-Spam-Status: No, hits=1.4 required=10.0 tests=SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (asf.osuosl.org: 64.74.244.71 is neither permitted nor denied by domain of geir@pobox.com) Received: from [64.74.244.71] (HELO chi.mobile-health-diary.com) (64.74.244.71) by apache.org (qpsmtpd/0.29) with SMTP; Tue, 14 Feb 2006 21:08:52 -0800 Received: (qmail 22733 invoked from network); 15 Feb 2006 05:08:24 -0000 Received: from ool-43560634.dyn.optonline.net (HELO ?192.168.2.4?) (geir@67.86.6.52) by b014.internal.mobile-health-diary.com with SMTP; 15 Feb 2006 05:08:24 -0000 Message-ID: <43F2B723.8080201@pobox.com> Date: Wed, 15 Feb 2006 00:07:47 -0500 From: Geir Magnusson Jr Reply-To: geir@pobox.com User-Agent: Thunderbird 1.5 (Windows/20051201) MIME-Version: 1.0 To: harmony-dev@incubator.apache.org Subject: Re: [jchevm] native method API for _jc_new_intern_string -- do you plan to add to _jc_ilib_entry table? References: <4dd1f3f00602131759n791c9344m61ff064ec1b6629c@mail.gmail.com> <43F13D91.1070009@dellroad.org> <43F1BB16.4030904@gmail.com> <43F1EDA6.70400@dellroad.org> <4dd1f3f00602140738p6ad3e1d5s3963bfc1cb40b944@mail.gmail.com> <43F2070C.2050904@gmail.com> <4dd1f3f00602142054t675bce95t16881152f599396d@mail.gmail.com> In-Reply-To: <4dd1f3f00602142054t675bce95t16881152f599396d@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N could it throw an Error rather than while(true)? Much easier to debug... :) Weldon Washburn wrote: > On 2/14/06, Tim Ellison wrote: >> Weldon Washburn wrote: >>> Question -- does it make sense to include a stupid, simple >>> String.intern() in the kernel class to make it even easier and more >>> convenient for someone trying to graft Harmony Class Libraries to a >>> new JVM? >> Sure, we can add it to the KERNEL module stubs so people can choose to >> reuse it or replace it as they see fit. Care to contribute yours? > OK. But I warn you its really stupid, really simple and... its never > even been compiled. Below is the code: > > private String [] internArray = new String[256]; > public String intern() > { > System.out.println("String.intern() is not fully implemented"); > > for (int ii = 0; ii < internArray.length; ii++) > { > if (this.equals(internArray[ii])) > return internArray[ii]; > if (internArray[ii] == null) > { > internArray[ii] = this; > return this; > } > } > while (true) > System.out.println("String.intern() --- error, overflowed > intern storage"); > } > > -- > Weldon Washburn > Intel Middleware Products Division > >