getDurableDestinations() now returns empty set if the persistence adaptor is null -

instead of throwing npe

git-svn-id: https://svn.apache.org/repos/asf/incubator/activemq/trunk@377701 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Robert Davies 2006-02-14 11:31:56 +00:00
parent 84942ae5b0
commit f7ed407271
1 changed files with 2 additions and 1 deletions

View File

@ -50,6 +50,7 @@ import javax.jms.JMSException;
import java.io.IOException; import java.io.IOException;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap; import java.util.HashMap;
import java.util.Map; import java.util.Map;
import java.util.Set; import java.util.Set;
@ -456,7 +457,7 @@ public class RegionBroker implements Broker {
} }
public Set getDurableDestinations(){ public Set getDurableDestinations(){
return adaptor.getDestinations(); return adaptor != null ? adaptor.getDestinations() : Collections.EMPTY_SET;
} }