complement the missing conditional statement (#329)

diff --git a/src/main/java/org/apache/pulsar/manager/service/impl/NamespacesServiceImpl.java b/src/main/java/org/apache/pulsar/manager/service/impl/NamespacesServiceImpl.java
index f5d1eea..f9d6e8c 100644
--- a/src/main/java/org/apache/pulsar/manager/service/impl/NamespacesServiceImpl.java
+++ b/src/main/java/org/apache/pulsar/manager/service/impl/NamespacesServiceImpl.java
@@ -100,21 +100,24 @@
 
                 }
                 for (String tenantNamespace : namespacesList) {
-                    String namespace = tenantNamespace.split("/")[1];
-                    Map<String, Object> topicsEntity = Maps.newHashMap();
-                    Map<String, Object> topics = topicsService.getTopicsList(
-                            0, 0, tenant, namespace, requestHost);
-                    topicsEntity.put("topics", topics.get("total"));
-                    topicsEntity.put("namespace", namespace);
-                    if (topicStatsEntityMap.get(namespace) != null) {
-                        TopicStatsEntity topicStatsEntity = topicStatsEntityMap.get(namespace);
-                        topicsEntity.put("inMsg", topicStatsEntity.getMsgRateIn());
-                        topicsEntity.put("outMsg", topicStatsEntity.getMsgRateOut());
-                        topicsEntity.put("inBytes", topicStatsEntity.getMsgThroughputIn());
-                        topicsEntity.put("outBytes", topicStatsEntity.getMsgThroughputOut());
-                        topicsEntity.put("storageSize", topicStatsEntity.getStorageSize());
+                    String[] path = tenantNamespace.split("/");
+                    if (path.length > 1) {
+                        String namespace = path[1];
+                        Map<String, Object> topicsEntity = Maps.newHashMap();
+                        Map<String, Object> topics = topicsService.getTopicsList(
+                                0, 0, tenant, namespace, requestHost);
+                        topicsEntity.put("topics", topics.get("total"));
+                        topicsEntity.put("namespace", namespace);
+                        if (topicStatsEntityMap.get(namespace) != null) {
+                            TopicStatsEntity topicStatsEntity = topicStatsEntityMap.get(namespace);
+                            topicsEntity.put("inMsg", topicStatsEntity.getMsgRateIn());
+                            topicsEntity.put("outMsg", topicStatsEntity.getMsgRateOut());
+                            topicsEntity.put("inBytes", topicStatsEntity.getMsgThroughputIn());
+                            topicsEntity.put("outBytes", topicStatsEntity.getMsgThroughputOut());
+                            topicsEntity.put("storageSize", topicStatsEntity.getStorageSize());
+                        }
+                        namespacesArray.add(topicsEntity);
                     }
-                    namespacesArray.add(topicsEntity);
                 }
                 namespacesMap.put("isPage", false);
                 namespacesMap.put("total", namespacesList.size());