This repository was archived by the owner on Mar 4, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +9
-5
lines changed
src/main/java/com/ning/util Expand file tree Collapse file tree 2 files changed +9
-5
lines changed Original file line number Diff line number Diff line change 11
11
import java .util .Properties ;
12
12
13
13
/**
14
- * Created by wangn on 2017/5/25.
14
+ *
15
+ * @author wangn
16
+ * @date 2017/5/25
15
17
*/
16
18
public class PropertiesUtil {
17
19
public static String getUpLoadFilePath () throws Exception {
@@ -23,7 +25,7 @@ public static String getUpLoadFilePath() throws Exception {
23
25
throw new FileException ("获取文件路径失败!" + e .getMessage ());
24
26
}
25
27
String filepath = properties .getProperty ("upLoadFilePath" );
26
- if (filepath == null || filepath .equals ("" )) {
28
+ if (filepath == null || "" .equals (filepath )) {
27
29
throw new FileException ("文件路径不正确:upLoadFilePath=" + filepath );
28
30
}
29
31
return filepath ;
Original file line number Diff line number Diff line change 9
9
import javax .servlet .http .HttpServletRequest ;
10
10
11
11
/**
12
- * Created by wangn on 2017/5/31.
12
+ *
13
+ * @author wangn
14
+ * @date 2017/5/31
13
15
*/
14
16
public class QQLoginUtil {
15
17
public static String getUserOpenID (HttpServletRequest request ) throws LoginException {
16
- String openID = null ;
18
+ String openID ;
17
19
try {
18
20
AccessToken accessTokenObj = (new Oauth ()).getAccessTokenByRequest (request );
19
- if (accessTokenObj .getAccessToken (). equals ( "" )) {
21
+ if ("" . equals ( accessTokenObj .getAccessToken ())) {
20
22
throw new LoginException ("未获取到参数!" );
21
23
} else {
22
24
openID = new OpenID (accessTokenObj .getAccessToken ()).getUserOpenID ();
You can’t perform that action at this time.
0 commit comments