From 971b8b7742b7209b94bde6faeeaa87babcea6bab Mon Sep 17 00:00:00 2001 From: caiosimpl Date: Wed, 20 May 2026 10:42:13 -0300 Subject: [PATCH] refactor: replace inheritance with delegation in TemporaryURLContent --- .../sweethome3d/tools/TemporaryURLContent.java | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/src/com/eteks/sweethome3d/tools/TemporaryURLContent.java b/src/com/eteks/sweethome3d/tools/TemporaryURLContent.java index 96262f24..1a66e7e1 100644 --- a/src/com/eteks/sweethome3d/tools/TemporaryURLContent.java +++ b/src/com/eteks/sweethome3d/tools/TemporaryURLContent.java @@ -32,11 +32,22 @@ * URL content for files, images... * @author Emmanuel Puybaret */ -public class TemporaryURLContent extends URLContent { +public class TemporaryURLContent implements Content { private static final long serialVersionUID = 1L; + private final URLContent delegate; + public TemporaryURLContent(URL temporaryUrl) { - super(temporaryUrl); + this.delegate = new URLContent(temporaryUrl); + } + + @Override + public InputStream openStream() throws IOException { + return delegate.openStream(); + } + + public URL getURL() { + return delegate.getURL(); } /**