File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed
weixin-java-common/src/main/java/me/chanjar/weixin/common/util/http Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -53,3 +53,6 @@ sonar-project.properties
5353
5454! /.mvn /wrapper /maven-wrapper.jar
5555* .versionsBackup
56+
57+ # STS
58+ .factorypath
Original file line number Diff line number Diff line change @@ -58,7 +58,7 @@ public String getFileName() throws WxErrorException {
5858 private String getFileName (CloseableHttpResponse response ) throws WxErrorException {
5959 Header [] contentDispositionHeader = response .getHeaders ("Content-disposition" );
6060 if (contentDispositionHeader == null || contentDispositionHeader .length == 0 ) {
61- throw new WxErrorException (WxError .builder ().errorMsg ("无法获取到文件名" ).build ());
61+ throw new WxErrorException (WxError .builder ().errorMsg ("无法获取到文件名" ).errorCode ( 99999 ). build ());
6262 }
6363
6464 return this .extractFileNameFromContentString (contentDispositionHeader [0 ].getValue ());
@@ -76,15 +76,15 @@ private String getFileName(Response response) throws WxErrorException {
7676
7777 private String extractFileNameFromContentString (String content ) throws WxErrorException {
7878 if (content == null || content .length () == 0 ) {
79- throw new WxErrorException (WxError .builder ().errorMsg ("无法获取到文件名" ).build ());
79+ throw new WxErrorException (WxError .builder ().errorMsg ("无法获取到文件名" ).errorCode ( 99999 ). build ());
8080 }
8181
8282 Matcher m = PATTERN .matcher (content );
8383 if (m .matches ()) {
8484 return m .group (1 );
8585 }
8686
87- throw new WxErrorException (WxError .builder ().errorMsg ("无法获取到文件名" ).build ());
87+ throw new WxErrorException (WxError .builder ().errorMsg ("无法获取到文件名" ).errorCode ( 99999 ). build ());
8888 }
8989
9090}
You can’t perform that action at this time.
0 commit comments