Merge "Fix Logback"
authorSeshu Kumar M <seshu.kumar.m@huawei.com>
Wed, 5 Sep 2018 04:39:49 +0000 (04:39 +0000)
committerGerrit Code Review <gerrit@onap.org>
Wed, 5 Sep 2018 04:39:49 +0000 (04:39 +0000)
adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/async/client/CreateNetworkNotification.java
adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/async/client/NetworkRollback.java
adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/async/client/QueryNetworkNotification.java
adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/async/client/UpdateNetworkNotification.java
adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/tenant/MsoTenantAdapter.java
adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/tenant/TenantAdapterRest.java
mso-api-handlers/mso-api-handler-infra/src/main/java/org/onap/so/apihandlerinfra/SpringContextHelper.java

index 8135088..fcce165 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
@@ -346,7 +348,7 @@ public class CreateNetworkNotification {
          */
         public List<CreateNetworkNotification.SubnetIdMap.Entry> getEntry() {
             if (entry == null) {
-                entry = new ArrayList<CreateNetworkNotification.SubnetIdMap.Entry>();
+                entry = new ArrayList<>();
             }
             return this.entry;
         }
index 4fde850..e7ace11 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
@@ -362,7 +364,7 @@ public class NetworkRollback {
      */
     public List<Integer> getVlans() {
         if (vlans == null) {
-            vlans = new ArrayList<Integer>();
+            vlans = new ArrayList<>();
         }
         return this.vlans;
     }
index 55a8e3d..87aa218 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
@@ -314,7 +316,7 @@ public class QueryNetworkNotification {
      */
     public List<Integer> getVlans() {
         if (vlans == null) {
-            vlans = new ArrayList<Integer>();
+            vlans = new ArrayList<>();
         }
         return this.vlans;
     }
@@ -406,7 +408,7 @@ public class QueryNetworkNotification {
          */
         public List<QueryNetworkNotification.SubnetIdMap.Entry> getEntry() {
             if (entry == null) {
-                entry = new ArrayList<QueryNetworkNotification.SubnetIdMap.Entry>();
+                entry = new ArrayList<>();
             }
             return this.entry;
         }
index f61d0a8..daff548 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
@@ -292,7 +294,7 @@ public class UpdateNetworkNotification {
          */
         public List<UpdateNetworkNotification.SubnetIdMap.Entry> getEntry() {
             if (entry == null) {
-                entry = new ArrayList<UpdateNetworkNotification.SubnetIdMap.Entry>();
+                entry = new ArrayList<>();
             }
             return this.entry;
         }
index 37a84c1..d82d478 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
@@ -30,7 +32,6 @@ import javax.jws.WebService;
 import javax.xml.bind.annotation.XmlElement;
 import javax.xml.ws.Holder;
 
-import org.onap.so.adapters.tenant.exceptions.TenantAlreadyExists;
 import org.onap.so.adapters.tenant.exceptions.TenantException;
 import org.onap.so.adapters.tenantrest.TenantRollback;
 import org.onap.so.entity.MsoRequest;
index 2bba3f5..6b194ec 100644 (file)
@@ -5,6 +5,8 @@
  * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
  * Copyright (C) 2017 Huawei Technologies Co., Ltd. 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
@@ -72,7 +74,7 @@ import io.swagger.annotations.ApiResponses;
 @Component
 public class TenantAdapterRest {
        private static MsoLogger LOGGER = MsoLogger.getMsoLogger (MsoLogger.Catalog.RA, TenantAdapterRest.class);
-       
+       private static final String EXCEPTION= "Exception :";
        //RAA? No logging in wrappers
        @Autowired
        private MsoTenantAdapterImpl tenantImpl;
@@ -150,17 +152,17 @@ public class TenantAdapterRest {
 //                                                                                             tenantRollback);
                }
                catch (TenantAlreadyExists tae) {
-                       LOGGER.debug("Exception :",tae);
+                       LOGGER.debug(EXCEPTION,tae);
                        CreateTenantError exc = new CreateTenantError(tae.getMessage(), tae.getFaultInfo().getCategory(), Boolean.TRUE);
                        return Response.status(HttpServletResponse.SC_NOT_IMPLEMENTED).entity(exc).build();
                }
                catch (TenantException te) {
-                       LOGGER.debug("Exception :",te);
+                       LOGGER.debug(EXCEPTION,te);
                        CreateTenantError exc = new CreateTenantError(te.getFaultInfo().getMessage(), te.getFaultInfo().getCategory(), Boolean.TRUE);
                        return Response.status(HttpServletResponse.SC_INTERNAL_SERVER_ERROR).entity(exc).build();
                }
                catch (Exception e) {
-                       LOGGER.debug("Exception :",e);
+                       LOGGER.debug(EXCEPTION,e);
                        CreateTenantError exc = new CreateTenantError(e.getMessage(), MsoExceptionCategory.INTERNAL, Boolean.TRUE);
                        return Response.status(HttpServletResponse.SC_INTERNAL_SERVER_ERROR).entity(exc).build();
                }
@@ -213,12 +215,12 @@ public class TenantAdapterRest {
                    tenantDeleted = deleted.value;
                }
                catch (TenantException te) {
-                       LOGGER.debug("Exception :",te);
+                       LOGGER.debug(EXCEPTION,te);
                        DeleteTenantError exc = new DeleteTenantError(te.getFaultInfo().getMessage(), te.getFaultInfo().getCategory(), Boolean.TRUE);
                        return Response.status(HttpServletResponse.SC_INTERNAL_SERVER_ERROR).entity(exc).build();
                }
                catch (Exception e) {
-                       LOGGER.debug("Exception :",e);
+                       LOGGER.debug(EXCEPTION,e);
                        DeleteTenantError exc = new DeleteTenantError(e.getMessage(), MsoExceptionCategory.INTERNAL, Boolean.TRUE);
                        return Response.status(HttpServletResponse.SC_INTERNAL_SERVER_ERROR).entity(exc).build();
                }
@@ -279,12 +281,12 @@ public class TenantAdapterRest {
 //                     tenant = TAImpl.queryTenant (cloudSiteId, tenantId, msoReq);
                }
                catch (TenantException te) {
-                       LOGGER.debug("Exception :",te);
+                       LOGGER.debug(EXCEPTION,te);
                        QueryTenantError exc = new QueryTenantError(te.getFaultInfo().getMessage(), te.getFaultInfo().getCategory());
                        return Response.status(HttpServletResponse.SC_INTERNAL_SERVER_ERROR).entity(exc).build();
                }
                catch (Exception e) {
-                       LOGGER.debug("Exception :",e);
+                       LOGGER.debug(EXCEPTION,e);
                        QueryTenantError exc = new QueryTenantError(e.getMessage(), MsoExceptionCategory.INTERNAL);
                        return Response.status(HttpServletResponse.SC_INTERNAL_SERVER_ERROR).entity(exc).build();
                }
@@ -328,12 +330,12 @@ public class TenantAdapterRest {
                    impl.rollbackTenant(req.getTenantRollback());
                }
                catch (TenantException te) {
-                       LOGGER.debug("Exception :",te);
+                       LOGGER.debug(EXCEPTION,te);
                        RollbackTenantError exc = new RollbackTenantError(te.getFaultInfo().getMessage(), te.getFaultInfo().getCategory(), Boolean.TRUE);
                        return Response.status(HttpServletResponse.SC_INTERNAL_SERVER_ERROR).entity(exc).build();
                }
                catch (Exception e) {
-                       LOGGER.debug("Exception :",e);
+                       LOGGER.debug(EXCEPTION,e);
                        RollbackTenantError exc = new RollbackTenantError(e.getMessage(), MsoExceptionCategory.INTERNAL, Boolean.TRUE);
                        return Response.status(HttpServletResponse.SC_INTERNAL_SERVER_ERROR).entity(exc).build();
                }
index 0a996dc..6d61d3b 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
@@ -20,7 +22,6 @@
 
 package org.onap.so.apihandlerinfra;
 
-import org.springframework.beans.BeansException;
 import org.springframework.context.ApplicationContext;
 import org.springframework.context.ApplicationContextAware;
 import org.springframework.stereotype.Component;
@@ -31,7 +32,7 @@ public class SpringContextHelper implements ApplicationContextAware {
        private static ApplicationContext context;
 
        @Override
-       public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
+       public void setApplicationContext(ApplicationContext applicationContext) {
                context = applicationContext;
        }