Skip to content

Commit

Permalink
修复admin没有consumer时出现空指针异常
Browse files Browse the repository at this point in the history
  • Loading branch information
majinkai committed Nov 21, 2014
1 parent 345b228 commit 604a840
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@ public List<String> findAddresses() {
public List<String> findAddressesByApplication(String application) {
List<String> ret = new ArrayList<String>();
ConcurrentMap<String, Map<Long, URL>> consumerUrls = getRegistryCache().get(Constants.CONSUMERS_CATEGORY);
if(consumerUrls == null) return ret;

for(Map.Entry<String, Map<Long, URL>> e1 : consumerUrls.entrySet()) {
Map<Long, URL> value = e1.getValue();
for(Map.Entry<Long, URL> e2 : value.entrySet()) {
Expand Down

0 comments on commit 604a840

Please sign in to comment.