Merge "Function.java - sonar fixes"
[aaf/authz.git] / cadi / aaf / src / main / java / org / onap / aaf / cadi / aaf / v2_0 / AbsAAFLocator.java
index 14878d3..2405962 100644 (file)
@@ -60,7 +60,7 @@ public abstract class AbsAAFLocator<TRANS extends Trans> implements Locator<URI>
     protected String myhostname;
     protected int myport;
     protected final String aaf_locator_host;
-    protected final URI aaf_locator_uri;
+    protected URI aaf_locator_uri;
     private long earliest;
     private final long refreshWait;
 
@@ -73,14 +73,14 @@ public abstract class AbsAAFLocator<TRANS extends Trans> implements Locator<URI>
                        throw new LocatorException(e1);
                }
         try {
-               aaf_locator_host = rph.replacements("https://"+Config.AAF_LOCATE_URL_TAG,null,null);
+               aaf_locator_host = rph.replacements(getClass().getSimpleName(),"https://"+Config.AAF_LOCATE_URL_TAG,null,null);
             aaf_locator_uri = new URI(aaf_locator_host);
             access.printf(Level.INFO, "AbsAAFLocator AAF URI is %s",aaf_locator_uri);
         } catch (URISyntaxException e) {
             throw new LocatorException(e);
         }
 
-        name = rph.replacements(name, null,null);
+        name = rph.replacements(getClass().getSimpleName(),name, null,null);
         access.printf(Level.INFO, "AbsAAFLocator name is %s",aaf_locator_uri);
 
         epList = new LinkedList<>();
@@ -462,5 +462,10 @@ public abstract class AbsAAFLocator<TRANS extends Trans> implements Locator<URI>
         return rv;
     }
 
+    protected void clear() {
+       epList.clear();
+       earliest=0L;
+    }
+
 
 }