I disagree. The documented behavior is that they can return in any order when walking the map. And that order has changed between jdk versions. But I have found that for a given jdk version, if I put the same data in in the same order, it comes out in the same order - which is very useful for junit tests.
And if it was random, that would mean that the hashmap was either purposely using a random number or had uninitialized variables. Correctly written software generally is repeatable. - dave ----- Original Message ----- From: "Paulo Soares" <[EMAIL PROTECTED]> To: "'David Thielen'" <[EMAIL PROTECTED]>; "itext" <[EMAIL PROTECTED]> Sent: Friday, January 24, 2003 8:13 AM Subject: RE: [iText-questions] Creating different files each time I run it > That's documented behavior for hash maps. > > Best Regards, > Paulo Soares > > > -----Original Message----- > > From: David Thielen [SMTP:[EMAIL PROTECTED]] > > Sent: Friday, January 24, 2003 14:51 > > To: itext > > Subject: Re: [iText-questions] Creating different files each time I > > run it > > > > yep - it's a font. That's still worrisome that a hashmap will operate > > differently on the same data... > > > > thanks - dave > > > > > > ----- Original Message ----- > > From: "Paulo Soares" <[EMAIL PROTECTED]> > > To: "'David Thielen'" <[EMAIL PROTECTED]>; "itext" > > <[EMAIL PROTECTED]> > > Sent: Friday, January 24, 2003 7:28 AM > > Subject: RE: [iText-questions] Creating different files each time I run it > > > > > > > Not necessarily. Most of the objects are stored in hash maps where the > > > extraction order can be any and some others are cached. It would be > > > interesting to know what was the displaced object, maybe a font? > > > > > > Best Regards, > > > Paulo Soares > > > > > > > -----Original Message----- > > > > From: David Thielen [SMTP:[EMAIL PROTECTED]] > > > > Sent: Friday, January 24, 2003 14:20 > > > > To: itext > > > > Subject: Re: [iText-questions] Creating different files each time I > > > > run it > > > > > > > > I understand the numbers can be anything. But I would think that > > running > > > > it > > > > twice in a row with identical commands would lead to identical > > numbers??? > > > > > > > > - dave > > > > > > > > > > > > ----- Original Message ----- > > > > From: "Paulo Soares" <[EMAIL PROTECTED]> > > > > To: "'David Thielen'" <[EMAIL PROTECTED]>; "itext" > > > > <[EMAIL PROTECTED]> > > > > Sent: Friday, January 24, 2003 3:46 AM > > > > Subject: RE: [iText-questions] Creating different files each time I > > run > > it > > > > > > > > > > > > > Pdfs can't be compared this way, the obj numbers can be anything and > > the > > > > > document be correct. > > > > > > > > > > Best Regards, > > > > > Paulo Soares > > > > > > > > > > > -----Original Message----- > > > > > > From: David Thielen [SMTP:[EMAIL PROTECTED]] > > > > > > Sent: Friday, January 24, 2003 2:39 > > > > > > To: itext > > > > > > Subject: [iText-questions] Creating different files each time I > > run > > > > > > it > > > > > > > > > > > > Hi; > > > > > > > > > > > > I tried to write a test program where I generate a pdf file, look > > at > > > > it > > > > > > carefully to make sure it's correct, then have aunit test that > > > > generates > > > > > > the same file and compares it byte by byte with the checked one. > > > > > > > > > > > > The problem is that ever time I run it, I get an error like this: > > > > > > > > > > > > Mis-match at line 62 in file > > > > > > C:\src\xmlReport\net\windward\xmlreport\test\report1.pdf > > > > > > correct (file) = 5 0 obj > > > > > > check (data) = 3 0 obj > > > > > > > > > > > > Any ideas? > > > > > > > > > > > > thanks - dave > > > > > > > > > > > > > > > ------------------------------------------------------- > > > > > This SF.NET email is sponsored by: > > > > > SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See! > > > > > http://www.vasoftware.com > > > > > _______________________________________________ > > > > > iText-questions mailing list > > > > > [EMAIL PROTECTED] > > > > > https://lists.sourceforge.net/lists/listinfo/itext-questions > > > > > > > > > > > > > > > > > > > > > ------------------------------------------------------- > > > > This SF.NET email is sponsored by: > > > > SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See! > > > > http://www.vasoftware.com > > > > _______________________________________________ > > > > iText-questions mailing list > > > > [EMAIL PROTECTED] > > > > https://lists.sourceforge.net/lists/listinfo/itext-questions > > > > > > > > > > > ------------------------------------------------------- > > This SF.NET email is sponsored by: > > SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See! > > http://www.vasoftware.com > > _______________________________________________ > > iText-questions mailing list > > [EMAIL PROTECTED] > > https://lists.sourceforge.net/lists/listinfo/itext-questions > > > ------------------------------------------------------- > This SF.NET email is sponsored by: > SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See! > http://www.vasoftware.com > _______________________________________________ > iText-questions mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/itext-questions > ------------------------------------------------------- This SF.NET email is sponsored by: SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See! http://www.vasoftware.com _______________________________________________ iText-questions mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/itext-questions