update something..

This commit is contained in:
jinyu
2015-06-28 09:44:10 +08:00
parent 0b35861009
commit 18c18b38eb
5 changed files with 10 additions and 9 deletions
@@ -107,7 +107,7 @@ public class MediaApi extends MpApi {
*/
public String uploadMedia(InputStream is, MediaType mediaType,
boolean isMaterial) throws WeixinException {
if (mediaType.equals(MediaType.video.name()) && isMaterial) {
if (mediaType == MediaType.video && isMaterial) {
throw new WeixinException(
"please invoke uploadMaterialVideo method");
}
@@ -133,7 +133,7 @@ public class MediaApi extends MpApi {
.toHexString())));
}
} catch (UnsupportedEncodingException e) {
; // ignore
throw new WeixinException(e);
} finally {
try {
is.close();