Skip to content

Commit 5b1abfb

Browse files
committed
Fixed Lint issue in UsePoolThreadSample
1 parent 304441c commit 5b1abfb

File tree

1 file changed

+7
-9
lines changed

1 file changed

+7
-9
lines changed

sample/src/main/java/com/loopj/android/http/sample/UsePoolThreadSample.java

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
package com.loopj.android.http.sample;
22

33
import android.util.Log;
4+
45
import com.loopj.android.http.AsyncHttpResponseHandler;
56
import com.loopj.android.http.ResponseHandlerInterface;
6-
import static com.loopj.android.http.sample.SampleParentActivity.LIGHTGREEN;
7-
import java.io.File;
87

98
import org.apache.http.Header;
109

10+
import java.io.File;
11+
1112
public class UsePoolThreadSample extends GetSample {
1213

1314
private static final String LOG_TAG = "UsePoolThreadSample";
@@ -95,20 +96,17 @@ public void run() {
9596
}
9697

9798
private File getRandomCacheFile() {
98-
File dir = getExternalCacheDir();
99-
if(dir == null) {
100-
dir = getCacheDir();
101-
if(dir == null) {
102-
dir = getFilesDir();
103-
}
99+
File dir = getCacheDir();
100+
if (dir == null) {
101+
dir = getFilesDir();
104102
}
105103

106104
return new File(dir, "sample-" + System.currentTimeMillis() + ".bin");
107105
}
108106

109107
private void saveBytesOnDisk(File destination, byte[] bytes) {
110108
// TODO: Spin your own implementation to save the bytes on disk/SD card.
111-
if(bytes != null && destination != null) {
109+
if (bytes != null && destination != null) {
112110
Log.d(LOG_TAG, "Saved " + bytes.length + " bytes into file: " + destination.getAbsolutePath());
113111
}
114112
}

0 commit comments

Comments
 (0)