VOL-543:  Provision for specifying urls where subscriber id is not at the end

Change-Id: I3aa7030ebe34f6ecaa6a761db523e0c6df7a3eb7
diff --git a/app/src/main/java/org/opencord/sadis/impl/SubscriberAndDeviceInformationAdapter.java b/app/src/main/java/org/opencord/sadis/impl/SubscriberAndDeviceInformationAdapter.java
index 5085ae8..5026e66 100644
--- a/app/src/main/java/org/opencord/sadis/impl/SubscriberAndDeviceInformationAdapter.java
+++ b/app/src/main/java/org/opencord/sadis/impl/SubscriberAndDeviceInformationAdapter.java
@@ -192,14 +192,9 @@
             }
         } else {
             // Augment URL with query parameters
-            StringBuilder buf = new StringBuilder(this.url);
-            if (buf.charAt(buf.length() - 1) != '/') {
-                buf.append('/');
-            }
+            String urlWithSubId = this.url.replaceAll("%s", id);
 
-            buf.append(id);
-
-            try (InputStream io = new URL(buf.toString()).openStream()) {
+            try (InputStream io = new URL(urlWithSubId).openStream()) {
                 info = mapper.readValue(io, SubscriberAndDeviceInformation.class);
                 local.put(id, info);
                 return info;