Skip to content

Commit

Permalink
Merge pull request apache#9 from markerking/master
Browse files Browse the repository at this point in the history
修复admin没有consumer时出现空指针异常
  • Loading branch information
li-shen committed Nov 21, 2014
2 parents 345b228 + 32c9f84 commit 41c5d56
Showing 1 changed file with 2 additions and 0 deletions.
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 41c5d56

Please sign in to comment.