changing anonymous subclass to lambda
This commit is contained in:
parent
6708feb70c
commit
997b3cabbe
@ -56,13 +56,10 @@ public class OkHttpFileUploadingLiveTest {
|
||||
.build();
|
||||
|
||||
|
||||
ProgressRequestWrapper.ProgressListener listener = new ProgressRequestWrapper.ProgressListener() {
|
||||
|
||||
public void onRequestProgress(long bytesWritten, long contentLength) {
|
||||
ProgressRequestWrapper.ProgressListener listener = (bytesWritten, contentLength) -> {
|
||||
|
||||
float percentage = 100f * bytesWritten / contentLength;
|
||||
assertFalse(Float.compare(percentage, 100) > 0);
|
||||
}
|
||||
};
|
||||
|
||||
ProgressRequestWrapper countingBody = new ProgressRequestWrapper(requestBody, listener);
|
||||
|
Loading…
x
Reference in New Issue
Block a user