From 7159f95bbcc1a8c3e1317c5d165c783f9c112024 Mon Sep 17 00:00:00 2001 From: CyC2018 Date: Wed, 28 Oct 2026 13:35:21 +0800 Subject: [PATCH] =?UTF-8?q?Update=20=E8=AE=BE=E8=AE=A1=E6=A8=A1=E5=BC=8F?= =?UTF-8?q?=20-=20=E4=BB=A3=E7=90=86.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit URL 改用 URI.create().toURL() 创建。 --- notes/设计模式 - 代理.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/notes/设计模式 - 代理.md b/notes/设计模式 - 代理.md index bfecfed8..896e3de6 100644 --- a/notes/设计模式 - 代理.md +++ b/notes/设计模式 - 代理.md @@ -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();