File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Java Micro Edition and the fly likes strange RecordComparator behavior Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Mobile » Java Micro Edition
Bookmark "strange RecordComparator behavior" Watch "strange RecordComparator behavior" New topic

strange RecordComparator behavior

Greg Schwartz
Ranch Hand

Joined: May 11, 2003
Posts: 132
I was wondering if anyone else has run into problems using the RecordComparator class to sort records by a value of type "long" that is representing a date.
The following scenario describes this problem: store 5/8/03 into an rms database
store 5/8/03 into an rms database
store 5/9/03 into an rms database
**retreiving these records works fine as they are retreived in the proper sorted order**
If I then store a record with 5/7/03 and retreive them all using a RecordComparator that compares these dates, the 5/7/03 transaction does not come before the 5/8/03 transactions.
If anyone has any ideas on what would be causing this behavior, please let me know. I'm not using multi-threading and have been rebuilding and destroying the enumerator as needed.
Thanks so much,

Greg Schwartz<br />Mobatech, LLC<br /><br /><a href="" target="_blank" rel="nofollow"></a>
I agree. Here's the link:
subject: strange RecordComparator behavior
It's not a secret anymore!