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 OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 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>
jQuery in Action, 3rd edition
subject: strange RecordComparator behavior
jQuery in Action, 3rd edition