Update 设计模式 - 代理.md

URL 改用 URI.create().toURL() 创建。
This commit is contained in:
CyC2018
2026-10-28 13:35:21 +08:00
parent 05a959bfe7
commit 7159f95bbc
+1 -1
View File
@@ -87,7 +87,7 @@ public class ImageViewer {
public static void main(String[] args) throws Exception {
String image = "http://image.jpg";
URL url = new URL(image);
URL url = URI.create(image).toURL();
HighResolutionImage highResolutionImage = new HighResolutionImage(url);
ImageProxy imageProxy = new ImageProxy(highResolutionImage);
imageProxy.showImage();