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
41
41
*/
42
42
public FileAsyncHttpResponseHandler (File file ) {
43
43
super ();
44
- assert (file != null );
44
+ AssertUtils . asserts (file != null , "File passed into FileAsyncHttpResponseHandler constructor must not be null" );
45
45
this .mFile = file ;
46
46
}
47
47
@@ -71,8 +71,10 @@ public boolean deleteTargetFile() {
71
71
* @return temporary file or null if creating file failed
72
72
*/
73
73
protected File getTemporaryFile (Context context ) {
74
- assert (context != null );
74
+ AssertUtils . asserts (context != null , "Tried creating temporary file without having Context" );
75
75
try {
76
+ // not effective in release mode
77
+ assert context != null ;
76
78
return File .createTempFile ("temp_" , "_handled" , context .getCacheDir ());
77
79
} catch (IOException e ) {
78
80
Log .e (LOG_TAG , "Cannot create temporary file" , e );
You can’t perform that action at this time.
0 commit comments