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();