mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-07-21 15:09:48 +08:00
fix code
This commit is contained in:
@@ -4,7 +4,7 @@ import java.util.Calendar;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 星座 来自:https://blog.csdn.net/u010758605/article/details/48317881
|
||||
* 星座 来自:<a href="https://blog.csdn.net/u010758605/article/details/48317881">https://blog.csdn.net/u010758605/article/details/48317881</a>
|
||||
*
|
||||
* @author looly
|
||||
* @since 4.4.3
|
||||
|
@@ -22,7 +22,7 @@ public class DataSizeUtil {
|
||||
|
||||
/**
|
||||
* 可读的文件大小<br>
|
||||
* 参考 http://stackoverflow.com/questions/3263892/format-file-size-as-mb-gb-etc
|
||||
* 参考 <a href="http://stackoverflow.com/questions/3263892/format-file-size-as-mb-gb-etc">http://stackoverflow.com/questions/3263892/format-file-size-as-mb-gb-etc</a>
|
||||
*
|
||||
* @param size Long类型大小
|
||||
* @return 大小
|
||||
|
@@ -1,4 +1,4 @@
|
||||
package cn.hutool.core.getter;
|
||||
package cn.hutool.core.lang.getter;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.math.BigInteger;
|
@@ -1,4 +1,4 @@
|
||||
package cn.hutool.core.getter;
|
||||
package cn.hutool.core.lang.getter;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.math.BigInteger;
|
@@ -1,4 +1,4 @@
|
||||
package cn.hutool.core.getter;
|
||||
package cn.hutool.core.lang.getter;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.math.BigInteger;
|
@@ -1,4 +1,4 @@
|
||||
package cn.hutool.core.getter;
|
||||
package cn.hutool.core.lang.getter;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.math.BigInteger;
|
@@ -1,4 +1,4 @@
|
||||
package cn.hutool.core.getter;
|
||||
package cn.hutool.core.lang.getter;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.math.BigInteger;
|
@@ -1,4 +1,4 @@
|
||||
package cn.hutool.core.getter;
|
||||
package cn.hutool.core.lang.getter;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.math.BigInteger;
|
@@ -1,4 +1,4 @@
|
||||
package cn.hutool.core.getter;
|
||||
package cn.hutool.core.lang.getter;
|
||||
|
||||
import cn.hutool.core.convert.Convert;
|
||||
|
@@ -1,4 +1,4 @@
|
||||
package cn.hutool.core.getter;
|
||||
package cn.hutool.core.lang.getter;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.math.BigInteger;
|
@@ -1,4 +1,4 @@
|
||||
package cn.hutool.core.getter;
|
||||
package cn.hutool.core.lang.getter;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.math.BigInteger;
|
@@ -4,4 +4,4 @@
|
||||
* @author looly
|
||||
*
|
||||
*/
|
||||
package cn.hutool.core.getter;
|
||||
package cn.hutool.core.lang.getter;
|
@@ -8,7 +8,7 @@ import cn.hutool.core.lang.Assert;
|
||||
import cn.hutool.core.lang.Pair;
|
||||
import cn.hutool.core.lang.func.Func0;
|
||||
import cn.hutool.core.lang.func.LambdaUtil;
|
||||
import cn.hutool.core.getter.BasicTypeGetter;
|
||||
import cn.hutool.core.lang.getter.BasicTypeGetter;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.math.BigInteger;
|
||||
|
@@ -1,7 +1,7 @@
|
||||
package cn.hutool.core.map;
|
||||
|
||||
import cn.hutool.core.convert.Convert;
|
||||
import cn.hutool.core.getter.OptNullBasicTypeFromObjectGetter;
|
||||
import cn.hutool.core.lang.getter.OptNullBasicTypeFromObjectGetter;
|
||||
import cn.hutool.core.util.ArrayUtil;
|
||||
import cn.hutool.core.util.BooleanUtil;
|
||||
import cn.hutool.core.classloader.ClassLoaderUtil;
|
||||
|
@@ -4,7 +4,7 @@ import cn.hutool.core.codec.PercentCodec;
|
||||
|
||||
/**
|
||||
* application/x-www-form-urlencoded,遵循W3C HTML Form content types规范,如空格须转+,+须被编码<br>
|
||||
* 规范见:https://url.spec.whatwg.org/#urlencoded-serializing
|
||||
* 规范见:<a href="https://url.spec.whatwg.org/#urlencoded-serializing">https://url.spec.whatwg.org/#urlencoded-serializing</a>
|
||||
*
|
||||
* @since 5.7.16
|
||||
*/
|
||||
|
@@ -1,41 +0,0 @@
|
||||
package cn.hutool.core.net;
|
||||
|
||||
import java.net.Authenticator;
|
||||
import java.net.PasswordAuthentication;
|
||||
|
||||
/**
|
||||
* 账号密码形式的{@link Authenticator} 实现。
|
||||
*
|
||||
* @author looly
|
||||
* @since 5.5.3
|
||||
*/
|
||||
public class PassAuth extends Authenticator {
|
||||
|
||||
/**
|
||||
* 创建账号密码形式的{@link Authenticator} 实现。
|
||||
*
|
||||
* @param user 用户名
|
||||
* @param pass 密码
|
||||
* @return PassAuth
|
||||
*/
|
||||
public static PassAuth of(String user, char[] pass) {
|
||||
return new PassAuth(user, pass);
|
||||
}
|
||||
|
||||
private final PasswordAuthentication auth;
|
||||
|
||||
/**
|
||||
* 构造
|
||||
*
|
||||
* @param user 用户名
|
||||
* @param pass 密码
|
||||
*/
|
||||
public PassAuth(String user, char[] pass) {
|
||||
auth = new PasswordAuthentication(user, pass);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected PasswordAuthentication getPasswordAuthentication() {
|
||||
return auth;
|
||||
}
|
||||
}
|
@@ -4,15 +4,25 @@ import java.net.Authenticator;
|
||||
import java.net.PasswordAuthentication;
|
||||
|
||||
/**
|
||||
* 账号密码形式的{@link Authenticator}
|
||||
* 账号密码形式的{@link Authenticator} 实现。
|
||||
*
|
||||
* @author looly
|
||||
* @since 5.7.2
|
||||
* @since 5.5.3
|
||||
*/
|
||||
public class UserPassAuthenticator extends Authenticator {
|
||||
|
||||
private final String user;
|
||||
private final char[] pass;
|
||||
/**
|
||||
* 创建账号密码形式的{@link Authenticator} 实现。
|
||||
*
|
||||
* @param user 用户名
|
||||
* @param pass 密码
|
||||
* @return PassAuth
|
||||
*/
|
||||
public static UserPassAuthenticator of(String user, char[] pass) {
|
||||
return new UserPassAuthenticator(user, pass);
|
||||
}
|
||||
|
||||
private final PasswordAuthentication auth;
|
||||
|
||||
/**
|
||||
* 构造
|
||||
@@ -21,13 +31,11 @@ public class UserPassAuthenticator extends Authenticator {
|
||||
* @param pass 密码
|
||||
*/
|
||||
public UserPassAuthenticator(String user, char[] pass) {
|
||||
this.user = user;
|
||||
this.pass = pass;
|
||||
auth = new PasswordAuthentication(user, pass);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected PasswordAuthentication getPasswordAuthentication() {
|
||||
return new PasswordAuthentication(this.user, this.pass);
|
||||
return auth;
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user