Merge "Fix docker build"
diff --git a/INFO.yaml b/INFO.yaml
index 345217e..90fc326 100644
--- a/INFO.yaml
+++ b/INFO.yaml
@@ -7,7 +7,7 @@
     email: 'gn422w@intl.att.com'
     id: 'osgn422w'
     company: 'ATT'
-    timezone: 'Belgium/Namur'
+    timezone: 'Europe/Brussels'
 primary_contact: *onap_releng_ptl
 issue_tracking:
     type: 'jira'
@@ -26,26 +26,31 @@
         email: 'cc697w@intl.att.com'
         company: 'ATT'
         id: 'ChrisC'
-        timezone: 'Belgium/Namur'
+        timezone: 'Europe/Brussels'
     - name: 'Eddy Hautot'
         email: 'eh552t@intl.att.com'
         company: 'ATT'
         id: 'ehautot'
-        timezone: 'Belgium/Namur'
+        timezone: 'Europe/Brussels'
     - name: 'Pierre Close'
         email: 'pc457b@intl.att.com'
         company: 'ATT'
         id: 'piclose'
-        timezone: 'Belgium/Namur'
+        timezone: 'Europe/Brussels'
     - name: 'Sébastien Determe'
         email: 'sd378r@intl.att.com'
         company: 'ATT'
         id: 'sebdet'
-        timezone: 'Belgium/Namur'
+        timezone: 'Europe/Brussels'
     - name: 'Xinyuan Wang'
         email: 'wang.xinyuan1@zte.com.cn'
         company: 'ZTE'
         id: 'Xinyuan'
-        timezone: 'Belgium/Namur'
+        timezone: 'Europe/Brussels'
+    - name: 'Xue Gao'
+        email: 'xg353y@intl.att.com'
+        company: 'ATT'
+        id: 'xuegao'
+        timezone: 'Europe/Brussels'
 tsc:
     approval: 'https://lists.onap.org/pipermail/onap-tsc'
diff --git a/extra/docker/clamp/config/org.onap.clamp.keyfile b/extra/docker/clamp/config/org.onap.clamp.keyfile
new file mode 100644
index 0000000..3e131ee
--- /dev/null
+++ b/extra/docker/clamp/config/org.onap.clamp.keyfile
@@ -0,0 +1,32 @@
+Bag Attributes
+    friendlyName: clamp@clamp.onap.org
+    localKeyID: 54 69 6D 65 20 31 35 33 30 36 32 36 36 37 38 32 30 31 
+Key Attributes: <No Attributes>
+-----BEGIN PRIVATE KEY-----
+M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pQMeWxNGyUeZLH+DrqSXiSQxFcQ15OY1
+49rE8o3PdQKBgQCj8Q4SVKh6FEAndKyJlujMZQKzwxu6yI2izEB7HO/UMYLy8KM5
+CyeusPv4/p4ORzQrRGM8dTpKdagqETTnxORZYvL9chqFfTY1GbqCmErJ4mlJOzny
+uIDQnhmm2kn/3Ydy1QLgGc9InaPpcAB6vGqHvT4h1zbj14/WouW4D9EXTQKBgDpA
+xW79UmlbKp8vSyDVd1NZghfillzZpLY83TjHpstJxycDXXdbF1oUSk5Hde6aNGz3
+szLqA997AmWiX65Wh3yaBvJbW+dYIwgs/L3R+HYPfSw2ZBO4bFs9KRGlN5LMnjKu
+cYhe539DzmP0x7R1S1Gz9tY1uRGB1lswRAtUa9q5AoGAb7bNvexDAmiHAKe96j0A
+tjHAYInJvvont5vdUZipsoY+RbWitsDwv5UsjuRcMkZlMydzQpU0Glc1JcnuJGCf
+AEFex2V9xru1CFJQtWxD7qeIqYlYUPLZuoLVNbgtAXBAFyUjcUeXIAEg4Ti2tlvc
+86nrgb7/kSLXqHV4/Ykg15s=
+-----END PRIVATE KEY-----
diff --git a/extra/docker/clamp/config/org.onap.clamp.p12 b/extra/docker/clamp/config/org.onap.clamp.p12
new file mode 100644
index 0000000..fd151a9
--- /dev/null
+++ b/extra/docker/clamp/config/org.onap.clamp.p12
Binary files differ
diff --git a/extra/docker/clamp/config/truststoreONAPall.jks b/extra/docker/clamp/config/truststoreONAPall.jks
new file mode 100644
index 0000000..910f9b1
--- /dev/null
+++ b/extra/docker/clamp/config/truststoreONAPall.jks
Binary files differ
diff --git a/extra/docker/clamp/docker-compose.yml b/extra/docker/clamp/docker-compose.yml
index 69e4715..0821fff 100644
--- a/extra/docker/clamp/docker-compose.yml
+++ b/extra/docker/clamp/docker-compose.yml
@@ -22,6 +22,7 @@
       - clamp.env
     ports:
       - "8080:8080"
+      - "8443:8443"
 
   third_party_proxy:
     image: python:2-slim
diff --git a/src/main/java/org/onap/clamp/clds/client/req/sdc/SdcCatalogServices.java b/src/main/java/org/onap/clamp/clds/client/req/sdc/SdcCatalogServices.java
index 9c94021..240094e 100644
--- a/src/main/java/org/onap/clamp/clds/client/req/sdc/SdcCatalogServices.java
+++ b/src/main/java/org/onap/clamp/clds/client/req/sdc/SdcCatalogServices.java
@@ -17,6 +17,7 @@
  * See the License for the specific language governing permissions and

  * limitations under the License.

  * ============LICENSE_END============================================

+ * Modifications copyright (c) 2018 Nokia

  * ===================================================================

  * 

  */

@@ -227,13 +228,12 @@
      */

     public List<SdcResourceBasicInfo> removeDuplicateSdcResourceBasicInfo(

             List<SdcResourceBasicInfo> rawCldsSdcResourceListBasicList) {

-        List<SdcResourceBasicInfo> cldsSdcResourceBasicInfoList = null;

+        List<SdcResourceBasicInfo> cldsSdcResourceBasicInfoList = new ArrayList<>();

         if (rawCldsSdcResourceListBasicList != null && !rawCldsSdcResourceListBasicList.isEmpty()) {

             // sort list

             Collections.sort(rawCldsSdcResourceListBasicList);

             // and then take only the resources with the max version (last in

             // the list with the same name)

-            cldsSdcResourceBasicInfoList = new ArrayList<>();

             for (int i = 1; i < rawCldsSdcResourceListBasicList.size(); i++) {

                 // compare name with previous - if not equal, then keep the

                 // previous (it's the last with that name)

diff --git a/src/test/java/org/onap/clamp/clds/it/SdcCatalogServicesItCase.java b/src/test/java/org/onap/clamp/clds/it/SdcCatalogServicesItCase.java
index 4a13c62..330ee60 100644
--- a/src/test/java/org/onap/clamp/clds/it/SdcCatalogServicesItCase.java
+++ b/src/test/java/org/onap/clamp/clds/it/SdcCatalogServicesItCase.java
@@ -17,14 +17,17 @@
  * See the License for the specific language governing permissions and 
  * limitations under the License.
  * ============LICENSE_END============================================
+ * Modifications copyright (c) 2018 Nokia
  * ===================================================================
  * 
  */
 
 package org.onap.clamp.clds.it;
 
+import static org.assertj.core.api.Assertions.assertThat;
 import static org.junit.Assert.assertTrue;
 
+import java.util.ArrayList;
 import java.util.LinkedList;
 import java.util.List;
 
@@ -170,6 +173,23 @@
         assertTrue("1.0".equals(res2.getVersion()));
     }
 
+
+    @Test
+    public void removeDuplicateSdcFunctionShouldNotReturnNull(){
+        // given
+        SdcCatalogServices catalogServices = new SdcCatalogServices();
+
+        // when
+        List<SdcResourceBasicInfo> firstResult = catalogServices
+            .removeDuplicateSdcResourceBasicInfo(null);
+        List<SdcResourceBasicInfo> secondResult = catalogServices
+            .removeDuplicateSdcResourceBasicInfo(new ArrayList<>());
+
+        // then
+        assertThat(firstResult).isEmpty();
+        assertThat(secondResult).isEmpty();
+    }
+
     @Test
     public void getServiceUuidFromServiceInvariantIdTest() throws Exception {
         SdcCatalogServices spy = Mockito.spy(sdcCatalogWired);