removed unneeded stream close
This commit is contained in:
parent
c66597b085
commit
e742703bc0
|
@ -22,7 +22,6 @@ import android.support.annotation.NonNull;
|
|||
|
||||
import org.mariotaku.microblog.library.MicroBlogException;
|
||||
import org.mariotaku.restfu.RestConverter;
|
||||
import org.mariotaku.restfu.RestFuUtils;
|
||||
import org.mariotaku.restfu.http.ContentType;
|
||||
import org.mariotaku.restfu.http.HttpResponse;
|
||||
import org.mariotaku.restfu.http.mime.Body;
|
||||
|
@ -41,7 +40,6 @@ public class OAuthTokenResponseConverter implements RestConverter<HttpResponse,
|
|||
@Override
|
||||
public OAuthToken convert(@NonNull HttpResponse response) throws IOException, ConvertException {
|
||||
final Body body = response.getBody();
|
||||
try {
|
||||
final ContentType contentType = body.contentType();
|
||||
final ByteArrayOutputStream os = new ByteArrayOutputStream();
|
||||
body.writeTo(os);
|
||||
|
@ -54,8 +52,5 @@ public class OAuthTokenResponseConverter implements RestConverter<HttpResponse,
|
|||
} catch (ParseException e) {
|
||||
throw new ConvertException(e);
|
||||
}
|
||||
} finally {
|
||||
RestFuUtils.closeSilently(body);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue