Changeset 17773 for gli

Show
Ignore:
Timestamp:
06.11.2008 20:37:15 (11 years ago)
Author:
ak19
Message:

Fixed bug I introduced in recent changes to Download panel which caused an infinite exception to be thrown (thread problem) if you viewed the log for a different download job's URL after having viewed the log for a previous download job's URL.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • gli/trunk/src/org/greenstone/gatherer/download/DownloadScrollPane.java

    r17526 r17773  
    9393        } 
    9494         
    95         job = null; 
     95        setJobToNull();//job = null; 
    9696         
    9797    } 
     
    9999    finishedDownloadJob(delete_me); 
    100100    } 
     101 
     102    synchronized protected void setJobToNull() { job = null; }   
    101103 
    102104    /** To be called when a download job has terminated naturally or was prematurely stopped 
     
    213215            DebugStream.println("DownloadJob " + jobDisplayString + " Begun."); 
    214216            System.err.println("DownloadJob " + job.port + " " + job.toString() + " Begun."); 
    215             job.callDownload(); 
     217            if(job != null) { 
     218                job.callDownload(); 
     219            } 
    216220            finishedDownloadJob(delete_me); // Job is done, get rid of the separate display panel for this download 
    217221            System.err.println("DownloadJob " + jobDisplayString + " complete.");