removed unneeded stream close

This commit is contained in:
Mariotaku Lee 2017-08-29 15:56:21 +08:00
parent c66597b085
commit e742703bc0
No known key found for this signature in database
GPG Key ID: 15C10F89D7C33535
1 changed files with 10 additions and 15 deletions

View File

@ -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);
}
}
}