Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » debugger exiting function with no reason
debugger exiting function with no reason [message #923188] Tue, 25 September 2012 17:29
Tomasz Kozera is currently offline Tomasz KozeraFriend
Messages: 1
Registered: September 2012
Junior Member
Hi. I've got Juno release (updated) and I have a problem that the debugger will exit my function in the middle while debugging. Here's the code:

static ArrayList<SyndEntry> GetChannelEntries(String link){
		ArrayList<SyndEntry> entries,timeSortedEntries;

		entries = new ArrayList<SyndEntry>();
		timeSortedEntries = new ArrayList<SyndEntry>();

		try {
			URL feedSource = new URL(link);
			SyndFeedInput input = new SyndFeedInput();
			SyndFeed feed = XmlReader(feedSource));

			entries = (ArrayList<SyndEntry>)feed.getEntries();

			//sort by time
			for(int i=0; i<entries.size(); i++) {
				next: {
					for(int j=0; j<i; j++){
						if(entries.get(i).getPublishedDate().compareTo(timeSortedEntries.get(j).getPublishedDate()) < 0) {
							timeSortedEntries.add(j, entries.get(i));
							break next;

			//remove old, viewed entries
			for(int i=0; i<timeSortedEntries.size(); i++) {
				Date d = timeSortedEntries.get(i).getPublishedDate();

				if( IsDateBefore(lastRunTime,d) ) {  //*** debugger exits after this line
				//if( lastRunTime.compareTo(timeSortedEntries.get(i).getPublishedDate()) > 0 ) {
					break;	//because it's sorted by time
		}catch(Exception e) {
			System.out.println("Error fetching RSS data from:\n"+link+"\n");

		return timeSortedEntries;

static boolean IsDateBefore(Date a, Date b) {
		//return (a.getTime() > b.getTime());
		long c = a.getTime();
		long d = b.getTime();

		return c > d;

SyndEntry is from rome-1.0 lib (import com.sun.syndication.feed.synd.SyndEntry;)

So when I debug it step-by-step when doing a step-over on the line indicated with *** the debugger moves to the last line (return timeSortedEntries;) - why on earth doest that happen?

If it were some exception it would get caught in the catch block and I would end up there and actually quit the app.

The 'i' var is at 0, the timeSortedEntries array has 50 items, none of which is null.

The data I use in that line (lastRunTime,d) is valid because I can step into the IsDateBefore function and go through it step-by-step to the end. All the local variables there are valid numbers (watched it) and all is calculated properly and returns true in this case.

This stuff happens always in this spot. I rerun the Eclipse, cleaned & rebuild the project but it still behaves like that...
Previous Topic:Master Page Locked
Next Topic:Authentication failure when attempting Pydev install
Goto Forum:

Current Time: Wed May 18 13:58:54 GMT 2022

Powered by FUDForum. Page generated in 0.03114 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top