Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Dubbo-3106]Make getRegistered return unmodifiable collection. #3106 #3425

Merged
merged 2 commits into from
Feb 21, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
import java.nio.channels.FileChannel;
import java.nio.channels.FileLock;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
Expand All @@ -50,6 +51,7 @@
import java.util.concurrent.Executors;
import java.util.concurrent.atomic.AtomicLong;
import java.util.concurrent.atomic.AtomicReference;
import java.util.stream.Collectors;
kezhenxu94 marked this conversation as resolved.
Show resolved Hide resolved

/**
* AbstractRegistry. (SPI, Prototype, ThreadSafe)
Expand Down Expand Up @@ -119,15 +121,15 @@ protected void setUrl(URL url) {
}

public Set<URL> getRegistered() {
return registered;
return Collections.unmodifiableSet(registered);
kezhenxu94 marked this conversation as resolved.
Show resolved Hide resolved
}

public Map<URL, Set<NotifyListener>> getSubscribed() {
return subscribed;
return Collections.unmodifiableMap(subscribed);
}

public Map<URL, Map<String, List<URL>>> getNotified() {
return notified;
return Collections.unmodifiableMap(notified);
}

public File getCacheFile() {
Expand Down