Article View: borland.public.jbuilder.java.language
Article #7634Casting back to an ArrayList
From: T Berry
Date: Thu, 31 May 2001 13:55
Date: Thu, 31 May 2001 13:55
19 lines
1569 bytes
1569 bytes
I am writing a small routine (mid-tier for web app), to capture a
ResultSet to ArrayLists. Each row of fields is an ArrayList (aRow). Each
of these ArrayList rows is then added to a master ArrayList (aResult). I
am having a problem casting back to the aRow of ArrayLists to .get(i)
their objects. When I try the ArrayList aRow has a size of 0.
e.g. ArrayList aRow = new ArrayList();
aRow = (ArrayList)aResult.get(i);
aRow.size() returns 0,
aRow.get(i), where i = 0 to n, returns a
StackOverflowError
How do I retrieve the ArrayLists aRow?
Is there a better way to hold the ResultSet? (using CachedRowSets not an
option yet)
Thank you
Tom Berry
Technical Details
Message-ID:
<3B164D34.46DBB510@vhb.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!isdnet!howland.erols.net!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!dnewsShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f74b3,7459fa98cc493f31,start X-Google-Attributes: gidf74b3,public X-Google-ArrivalTime: 2001-05-31 07:16:14 PST Message-ID: <3B164D34.46DBB510@vhb.com> Date: Thu, 31 May 2001 09:55:00 -0400 From: T Berry <tberry@vhb.com> X-Mailer: Mozilla 4.75 [en] (WinNT; U) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: borland.public.jbuilder.java.language Subject: Casting back to an ArrayList Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit NNTP-Posting-Host: 204.243.173.176 X-Trace: dnews 991317280 204.243.173.176 (31 May 2001 06:54:40 -0700) Lines: 20 Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!isdnet!howland.erols.net!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!dnews