mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-05-09 23:51:34 +08:00
fix code
This commit is contained in:
parent
96dbdde1e5
commit
3dda0227b8
@ -19,8 +19,8 @@ public class PunyCodeTest {
|
|||||||
@Test
|
@Test
|
||||||
public void encodeDecodeTest2(){
|
public void encodeDecodeTest2(){
|
||||||
// 无需编码和解码
|
// 无需编码和解码
|
||||||
String text = "Hutool";
|
final String text = "Hutool";
|
||||||
String strPunyCode = PunyCode.encode(text);
|
final String strPunyCode = PunyCode.encode(text);
|
||||||
Assertions.assertEquals("Hutool", strPunyCode);
|
Assertions.assertEquals("Hutool", strPunyCode);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -59,10 +59,10 @@ public class PunyCodeTest {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void encodeEncodeDomainTest2(){
|
public void encodeEncodeDomainTest2(){
|
||||||
String domain = "赵新虎.com";
|
final String domain = "赵新虎.com";
|
||||||
String strPunyCode = PunyCode.encodeDomain(domain);
|
final String strPunyCode = PunyCode.encodeDomain(domain);
|
||||||
Assertions.assertEquals("xn--efvz93e52e.com", strPunyCode);
|
Assertions.assertEquals("xn--efvz93e52e.com", strPunyCode);
|
||||||
String decode = PunyCode.decodeDomain(strPunyCode);
|
final String decode = PunyCode.decodeDomain(strPunyCode);
|
||||||
Assertions.assertEquals(domain, decode);
|
Assertions.assertEquals(domain, decode);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -23,6 +23,11 @@ import java.nio.charset.Charset;
|
|||||||
public class FtpConfig implements Serializable {
|
public class FtpConfig implements Serializable {
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建默认配置
|
||||||
|
*
|
||||||
|
* @return FtpConfig
|
||||||
|
*/
|
||||||
public static FtpConfig of() {
|
public static FtpConfig of() {
|
||||||
return new FtpConfig();
|
return new FtpConfig();
|
||||||
}
|
}
|
||||||
@ -77,11 +82,11 @@ public class FtpConfig implements Serializable {
|
|||||||
/**
|
/**
|
||||||
* 构造
|
* 构造
|
||||||
*
|
*
|
||||||
* @param host 主机
|
* @param host 主机
|
||||||
* @param port 端口
|
* @param port 端口
|
||||||
* @param user 用户名
|
* @param user 用户名
|
||||||
* @param password 密码
|
* @param password 密码
|
||||||
* @param charset 编码
|
* @param charset 编码
|
||||||
*/
|
*/
|
||||||
public FtpConfig(final String host, final int port, final String user, final String password, final Charset charset) {
|
public FtpConfig(final String host, final int port, final String user, final String password, final Charset charset) {
|
||||||
this(host, port, user, password, charset, null, null);
|
this(host, port, user, password, charset, null, null);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user