Merge "Graph-removed unused imports"
authorvarun gudisena <varuneshwar.gudisena@att.com>
Tue, 22 Jan 2019 18:44:08 +0000 (18:44 +0000)
committerGerrit Code Review <gerrit@onap.org>
Tue, 22 Jan 2019 18:44:08 +0000 (18:44 +0000)
INFO.yaml [new file with mode: 0644]
pom.xml
src/main/java/org/onap/dmaap/dbcapi/authentication/ApiPerms.java
src/main/java/org/onap/dmaap/dbcapi/resources/BridgeResource.java
src/test/java/org/onap/dmaap/dbcapi/util/FqdnTest.java [new file with mode: 0644]

diff --git a/INFO.yaml b/INFO.yaml
new file mode 100644 (file)
index 0000000..172026d
--- /dev/null
+++ b/INFO.yaml
@@ -0,0 +1,42 @@
+---
+project: 'dmaap-dbcapi'
+project_creation_date: '2017-08-29'
+lifecycle_state: 'Incubation'
+project_lead: &onap_releng_ptl
+    name: 'Ram Koya'
+    email: 'rk541m@att.com'
+    id: 'rampi_k'
+    company: 'ATT'
+    timezone: 'America/Dallas'
+primary_contact: *onap_releng_ptl
+issue_tracking:
+    type: 'jira'
+    url: 'https://jira.onap.org/projects/DMAAP'
+    key: 'DMAAP'
+meetings:
+    - type: 'zoom'
+        agenda: ''
+        url: 'https://wiki.onap.org/pages/viewpage.action?pageId=13599275'
+        server: 'n/a'
+        channel: 'n/a'
+        repeats: 'weekly'
+        time: '13:00 UTC'
+committers:
+    - <<: *onap_releng_ptl
+    - name: 'Ramdas Sawant'
+        email: 'rs873m@att.com'
+        company: 'ATT'
+        id: 'rs873m'
+        timezone: 'America/Dallas'
+    - name: 'Varun Gudisena'
+        email: 'vg411h@att.com'
+        company: 'ATT'
+        id: 'vg411h'
+        timezone: 'America/Dallas'
+tsc:
+    approval: 'https://lists.onap.org/pipermail/onap-tsc'
+    changes:
+        - type: 'Removal'
+          name: 'Habib Madani'
+          name: 'Xinhui Li'
+          name: 'Jing Wang'
diff --git a/pom.xml b/pom.xml
index 8db05b1..975866c 100644 (file)
--- a/pom.xml
+++ b/pom.xml
            <jackson.version>2.9.5</jackson.version>
                <jersey.version>2.26</jersey.version>
                <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-               <jettyVersion>9.3.8.RC0</jettyVersion> 
+               <jettyVersion>9.4.12.RC2</jettyVersion> 
                <eelf.version>1.0.0</eelf.version>
                <artifact.version>1.0.20-SNAPSHOT</artifact.version>
                <!-- SONAR -->
index f3b9ebc..bcadf40 100644 (file)
@@ -3,6 +3,8 @@
  * org.onap.dmaap
  * ================================================================================
  * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * 
+ * Modifications Copyright (C) 2018 IBM.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -172,8 +174,8 @@ public  class ApiPerms extends BaseLoggingClass {
        }
        
        public void setEnvMap() {
-               Dmaap dmaap = new DmaapService().getDmaap();
-               String dmaapName = dmaap.getDmaapName();
+               Dmaap dmaapVar = new DmaapService().getDmaap();
+               String dmaapName = dmaapVar.getDmaapName();
                PermissionMap.initMap( envMap, dmaapName );
        }
        
index e6fede7..192b63d 100644 (file)
@@ -4,6 +4,8 @@
  * ================================================================================
  * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
  * ================================================================================
+ * Modifications Copyright (C) 2018 IBM.
+ * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
@@ -121,7 +123,7 @@ public class BridgeResource extends BaseLoggingClass {
                        }
                        logger.info( "Count for "+ key + ": " + mCnt);
                        totCnt += mCnt;
-                       if (showDetail) {
+                       if (showDetail && mm!=null) {
                                brTopic[s] =  new BrTopic();
                                brTopic[s].setBrSource( mm.getSourceCluster());
                                brTopic[s].setBrTarget(mm.getTargetCluster());
diff --git a/src/test/java/org/onap/dmaap/dbcapi/util/FqdnTest.java b/src/test/java/org/onap/dmaap/dbcapi/util/FqdnTest.java
new file mode 100644 (file)
index 0000000..7c7815f
--- /dev/null
@@ -0,0 +1,33 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * org.onap.dmaap
+ * ================================================================================
+ * Copyright (C) 2019 IBM Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+package org.onap.dmaap.dbcapi.util;
+
+import org.junit.Test;
+
+import static org.junit.Assert.*;
+
+public class FqdnTest {
+
+    @Test
+    public void testIsValid() {
+        assertTrue(Fqdn.isValid("www.ibm.com"));
+        assertFalse(Fqdn.isValid("testuser@ibm.com"));
+    }
+}
\ No newline at end of file