Article View: borland.public.jbuilder.java.language
Article #8585Re: JDK 1.3 Long
From: Daniel Ray
Date: Fri, 09 Mar 2001 21:23
Date: Fri, 09 Mar 2001 21:23
47 lines
2863 bytes
2863 bytes
With JDK 1.2.2 JBuilder 3.5
java.util.Hashtable h = (java.util.Hashtable) v.firstElement();
java.util.Enumeration e = h.keys();
java.util.Collection c = h.values();
java.util.Iterator i = c.iterator();
myFunctionId(new Long(i.next().toString()));
Correction I used when upgrading to JBuilder4 JDK 1.3
java.util.Hashtable h = (java.util.Hashtable) v.firstElement();
java.util.Enumeration e = h.keys();
java.util.Collection c = h.values();
java.util.Iterator i = c.iterator();
String iString = i.next().toString();
// So I won't skip an iteration while degugging.. copy per se
writeLogEvent("iString is = to " + iString, ERROR); // Just
a log file so I can view what's going on
writeLogEvent("iString length is " + iString.length(), ERROR); // Walla !!
This returns my Id of '0' + 5 whitespaces -- length = 6
myFunctionId(new Long(iString.trim())); //
Use trim() to get rid of whitespaces and continue
I don't understand where the whitespace is coming from.
"Torsten Welches" <torsten.welches@who.cares.netcologne.de> wrote in message
news:3aa72d40$1_2@dnews...
>
> Daniel,
>
> I'm not sure if I understand your problem. *Where* is whitespace
> involved? Are you using something like "new Long("10 34");"?
> And what "length" are you referring to?
> Can you post some code?
>
> Torsten
>
> "Daniel Ray" <dray@inphact.com> wrote:
> >I have an application that I have been using new Long throughout my
> >application built with JBuilder 3.5 and JDK 1.2.2
> >I upgraded my JBuilder to v4. Everything compiles fine. Now the errors
show
> >up. I've noticed that where I use Long..and then
> >get its length...it contains extra whitespaces. I now have to use the
trim()
> >function to fix this. I'm not complaining, just want to
> >know if this is something new with the way Long is handled in 1.3
>
Technical Details
Message-ID:
<3aa949b9$1_1@dnews>Path:
arc1-ca.pugleaf.net!supernews.google.com!sn-xit-02!sn-xit-03!supernews.com!logbridge.uoregon.edu!newsfeed.direct.ca!look.ca!hub.org!hub.org!PeerFeed.KWeb.on.ca!bornews.borland.com!dnews!63.64.121.199References:
<3aa722bf$1_1@dnews> <3aa72d40$1_2@dnews>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f74b3,f15c1a8a3e4b754d X-Google-Attributes: gidf74b3,public X-Google-ArrivalTime: 2001-03-09 13:31:52 PST Reply-To: "Daniel Ray" <dray@inphact.com> From: "Daniel Ray" <dray@inphact.com> Newsgroups: borland.public.jbuilder.java.language References: <3aa722bf$1_1@dnews> <3aa72d40$1_2@dnews> Subject: Re: JDK 1.3 Long Date: Fri, 9 Mar 2001 15:23:03 -0600 Lines: 50 Organization: Inphact X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 NNTP-Posting-Host: 63.64.121.199 Message-ID: <3aa949b9$1_1@dnews> X-Trace: 9 Mar 2001 13:23:05 -0800, 63.64.121.199 Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-02!sn-xit-03!supernews.com!logbridge.uoregon.edu!newsfeed.direct.ca!look.ca!hub.org!hub.org!PeerFeed.KWeb.on.ca!bornews.borland.com!dnews!63.64.121.199