File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed 
library/src/main/java/com/loopj/android/http Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ public abstract class FileAsyncHttpResponseHandler extends AsyncHttpResponseHand
4141     */ 
4242    public  FileAsyncHttpResponseHandler (File  file ) {
4343        super ();
44-         assert   (file  != null );
44+         AssertUtils . asserts (file  != null ,  "File passed into FileAsyncHttpResponseHandler constructor must not be null" );
4545        this .mFile  = file ;
4646    }
4747
@@ -71,8 +71,10 @@ public boolean deleteTargetFile() {
7171     * @return temporary file or null if creating file failed 
7272     */ 
7373    protected  File  getTemporaryFile (Context  context ) {
74-         assert   (context  != null );
74+         AssertUtils . asserts (context  != null ,  "Tried creating temporary file without having Context" );
7575        try  {
76+             // not effective in release mode 
77+             assert  context  != null ;
7678            return  File .createTempFile ("temp_" , "_handled" , context .getCacheDir ());
7779        } catch  (IOException  e ) {
7880            Log .e (LOG_TAG , "Cannot create temporary file" , e );
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments