Skip to content

Commit ec4d2d4

Browse files
committed
Improved Proxy
1 parent 8f52bd5 commit ec4d2d4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/StructuralPatterns/Proxy/ProxyVideoDownloader.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@
55

66
public class ProxyVideoDownloader implements VideoDownloader{
77
private final Map<String, Video> videoCache = new HashMap<>();
8-
private final VideoDownloader downloader = new RealVideoDownloader();
8+
private final VideoDownloader realSubject = new RealVideoDownloader();
99

1010
@Override
1111
public Video getVideo(String videoName) {
1212
if (!videoCache.containsKey(videoName)){
13-
videoCache.put(videoName, downloader.getVideo(videoName));
13+
videoCache.put(videoName, realSubject.getVideo(videoName));
1414
}
1515
return videoCache.get(videoName);
1616
}

0 commit comments

Comments
 (0)