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
53
53
54
54
! /.mvn /wrapper /maven-wrapper.jar
55
55
* .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 {
58
58
private String getFileName (CloseableHttpResponse response ) throws WxErrorException {
59
59
Header [] contentDispositionHeader = response .getHeaders ("Content-disposition" );
60
60
if (contentDispositionHeader == null || contentDispositionHeader .length == 0 ) {
61
- throw new WxErrorException (WxError .builder ().errorMsg ("无法获取到文件名" ).build ());
61
+ throw new WxErrorException (WxError .builder ().errorMsg ("无法获取到文件名" ).errorCode ( 99999 ). build ());
62
62
}
63
63
64
64
return this .extractFileNameFromContentString (contentDispositionHeader [0 ].getValue ());
@@ -76,15 +76,15 @@ private String getFileName(Response response) throws WxErrorException {
76
76
77
77
private String extractFileNameFromContentString (String content ) throws WxErrorException {
78
78
if (content == null || content .length () == 0 ) {
79
- throw new WxErrorException (WxError .builder ().errorMsg ("无法获取到文件名" ).build ());
79
+ throw new WxErrorException (WxError .builder ().errorMsg ("无法获取到文件名" ).errorCode ( 99999 ). build ());
80
80
}
81
81
82
82
Matcher m = PATTERN .matcher (content );
83
83
if (m .matches ()) {
84
84
return m .group (1 );
85
85
}
86
86
87
- throw new WxErrorException (WxError .builder ().errorMsg ("无法获取到文件名" ).build ());
87
+ throw new WxErrorException (WxError .builder ().errorMsg ("无法获取到文件名" ).errorCode ( 99999 ). build ());
88
88
}
89
89
90
90
}
You can’t perform that action at this time.
0 commit comments