Add JAVA_HOME to check.sh
Issue-ID: AAF-792
Change-Id: Ief0fd9d1b933c20cf0367fbaba2ea3e9f8d67fbb
Signed-off-by: Instrumental <jonathan.gathman@att.com>
diff --git a/auth/auth-certman/src/test/java/org/onap/aaf/auth/cm/test/CertmanTest.java b/auth/auth-certman/src/test/java/org/onap/aaf/auth/cm/test/CertmanTest.java
index 2eab9b2..80c9dbc 100644
--- a/auth/auth-certman/src/test/java/org/onap/aaf/auth/cm/test/CertmanTest.java
+++ b/auth/auth-certman/src/test/java/org/onap/aaf/auth/cm/test/CertmanTest.java
@@ -21,41 +21,16 @@
package org.onap.aaf.auth.cm.test;
-import java.io.InputStream;
-import java.net.HttpURLConnection;
-import java.net.InetAddress;
-import java.net.URI;
-import java.security.cert.CertificateException;
-
-import javax.security.auth.x500.X500Principal;
-
import org.junit.After;
-import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
-import org.junit.Test;
-import static org.junit.Assert.*;
import org.onap.aaf.auth.env.AuthzEnv;
-import org.onap.aaf.cadi.CadiException;
-import org.onap.aaf.cadi.Locator;
-import org.onap.aaf.cadi.Locator.Item;
-import org.onap.aaf.cadi.client.Future;
-import org.onap.aaf.cadi.client.Rcli;
-import org.onap.aaf.cadi.client.Retryable;
-import org.onap.aaf.cadi.config.SecurityInfoC;
-import org.onap.aaf.cadi.configure.Factory;
import org.onap.aaf.cadi.http.HBasicAuthSS;
import org.onap.aaf.cadi.http.HMangr;
-import org.onap.aaf.cadi.locator.DNSLocator;
-import org.onap.aaf.misc.env.APIException;
-import org.onap.aaf.misc.env.Data;
-import org.onap.aaf.misc.env.Data.TYPE;
-import org.onap.aaf.misc.env.util.Chrono;
import org.onap.aaf.misc.rosetta.env.RosettaDF;
import certman.v1_0.CertInfo;
import certman.v1_0.CertificateRequest;
-import junit.framework.Assert;
public class CertmanTest {
diff --git a/cadi/aaf/src/main/java/org/onap/aaf/cadi/configure/PlaceArtifactScripts.java b/cadi/aaf/src/main/java/org/onap/aaf/cadi/configure/PlaceArtifactScripts.java
index 123bb9d..05ffdbf 100644
--- a/cadi/aaf/src/main/java/org/onap/aaf/cadi/configure/PlaceArtifactScripts.java
+++ b/cadi/aaf/src/main/java/org/onap/aaf/cadi/configure/PlaceArtifactScripts.java
@@ -73,7 +73,11 @@
"APP="+arti.getNs()+'\n',
"EMAIL="+email+ '\n',
"JAR=\""+classpath.toString()+"\"\n",
- "JAVA=\""+javaHome() + "/bin/" +"java\"\n",
+ "if [ -z \"$JAVA_HOME\" ]; then \n",
+ " JAVA=\""+javaHome() + "/bin/" +"java\"\n",
+ "else\n",
+ " JAVA=\"$JAVA_HOME/bin/java\"\n",
+ "fi\n",
checkScript
);
diff --git a/cadi/client/src/main/java/org/onap/aaf/cadi/locator/DNSLocator.java b/cadi/client/src/main/java/org/onap/aaf/cadi/locator/DNSLocator.java
index b7c0b02..66ef4b1 100644
--- a/cadi/client/src/main/java/org/onap/aaf/cadi/locator/DNSLocator.java
+++ b/cadi/client/src/main/java/org/onap/aaf/cadi/locator/DNSLocator.java
@@ -187,6 +187,10 @@
startPort = Integer.parseInt(aaf_locate.substring(left + 1, dash));
endPort = Integer.parseInt(aaf_locate.substring(dash + 1, right));
}
+ slash = aaf_locate.indexOf('/', start);
+ if(slash>=0) {
+ suffix = aaf_locate.substring(slash);
+ }
} else {
slash = aaf_locate.indexOf('/', start);
@@ -197,6 +201,7 @@
startPort = endPort = Integer.parseInt(aaf_locate.substring(start));
} else {
startPort = endPort = Integer.parseInt(aaf_locate.substring(start, slash));
+ suffix = aaf_locate.substring(slash);
}
}
} else {