mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-07-21 15:09:48 +08:00
fix code
This commit is contained in:
@@ -13,7 +13,7 @@
|
||||
package org.dromara.hutool.swing;
|
||||
|
||||
import org.dromara.hutool.core.io.IORuntimeException;
|
||||
import org.dromara.hutool.core.net.url.URLUtil;
|
||||
import org.dromara.hutool.core.net.url.UrlUtil;
|
||||
|
||||
import java.awt.Desktop;
|
||||
import java.io.File;
|
||||
@@ -44,7 +44,7 @@ public class DesktopUtil {
|
||||
* @param url URL地址
|
||||
*/
|
||||
public static void browse(final String url) {
|
||||
browse(URLUtil.toURI(url));
|
||||
browse(UrlUtil.toURI(url));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -112,7 +112,7 @@ public class DesktopUtil {
|
||||
public static void mail(final String mailAddress) {
|
||||
final Desktop dsktop = getDsktop();
|
||||
try {
|
||||
dsktop.mail(URLUtil.toURI(mailAddress));
|
||||
dsktop.mail(UrlUtil.toURI(mailAddress));
|
||||
} catch (final IOException e) {
|
||||
throw new IORuntimeException(e);
|
||||
}
|
||||
|
@@ -16,7 +16,7 @@ import org.dromara.hutool.core.codec.binary.Base64;
|
||||
import org.dromara.hutool.core.io.file.FileUtil;
|
||||
import org.dromara.hutool.core.io.IORuntimeException;
|
||||
import org.dromara.hutool.core.io.IoUtil;
|
||||
import org.dromara.hutool.core.net.url.URLUtil;
|
||||
import org.dromara.hutool.core.net.url.UrlUtil;
|
||||
import org.dromara.hutool.swing.captcha.generator.CodeGenerator;
|
||||
import org.dromara.hutool.swing.captcha.generator.RandomGenerator;
|
||||
import org.dromara.hutool.swing.img.ImgUtil;
|
||||
@@ -214,7 +214,7 @@ public abstract class AbstractCaptcha implements ICaptcha {
|
||||
* @since 5.3.11
|
||||
*/
|
||||
public String getImageBase64Data(){
|
||||
return URLUtil.getDataUriBase64("image/png", getImageBase64());
|
||||
return UrlUtil.getDataUriBase64("image/png", getImageBase64());
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -21,7 +21,7 @@ import org.dromara.hutool.core.io.resource.Resource;
|
||||
import org.dromara.hutool.core.io.stream.FastByteArrayOutputStream;
|
||||
import org.dromara.hutool.core.lang.Assert;
|
||||
import org.dromara.hutool.core.math.NumberUtil;
|
||||
import org.dromara.hutool.core.net.url.URLUtil;
|
||||
import org.dromara.hutool.core.net.url.UrlUtil;
|
||||
import org.dromara.hutool.core.text.StrUtil;
|
||||
|
||||
import javax.imageio.ImageIO;
|
||||
@@ -1349,7 +1349,7 @@ public class ImgUtil {
|
||||
* @since 5.3.6
|
||||
*/
|
||||
public static String toBase64DataUri(final Image image, final String imageType) {
|
||||
return URLUtil.getDataUri(
|
||||
return UrlUtil.getDataUri(
|
||||
"image/" + imageType, "base64",
|
||||
toBase64(image, imageType));
|
||||
}
|
||||
|
@@ -14,7 +14,7 @@ package org.dromara.hutool.swing.img;
|
||||
|
||||
import org.dromara.hutool.core.io.file.FileTypeUtil;
|
||||
import org.dromara.hutool.core.io.file.FileUtil;
|
||||
import org.dromara.hutool.core.net.url.URLUtil;
|
||||
import org.dromara.hutool.core.net.url.UrlUtil;
|
||||
import org.junit.jupiter.api.Disabled;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
@@ -105,7 +105,7 @@ public class ImgTest {
|
||||
final File file = FileUtil.file(downloadFile);
|
||||
final File fileScale = FileUtil.file(downloadFile + ".scale." + FileTypeUtil.getType(file));
|
||||
|
||||
final Image img = ImgUtil.getImage(URLUtil.getURL(file));
|
||||
final Image img = ImgUtil.getImage(UrlUtil.getURL(file));
|
||||
ImgUtil.scale(img, fileScale, 0.8f);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user