Merge "Reorder modifiers"
[so.git] / adapters / mso-adapter-utils / src / main / java / org / openecomp / mso / openstack / utils / MsoHeatEnvironmentResource.java
index f5dffc3..a0c9b7a 100644 (file)
@@ -3,6 +3,7 @@
  * ONAP - SO
  * ================================================================================
  * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * Copyright (C) 2017 Huawei Technologies Co., Ltd. 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.
 
 package org.openecomp.mso.openstack.utils;
 
-
+import org.openecomp.mso.logger.MsoLogger;
 
 public class MsoHeatEnvironmentResource {
 
+    private static final MsoLogger LOGGER = MsoLogger.getMsoLogger (MsoLogger.Catalog.RA);
+    
        private String name;
        private String value;
        
@@ -53,10 +56,16 @@ public class MsoHeatEnvironmentResource {
        public void setValue(String value) {
                this.value = value;
        }
+
+       @Override
        public String toString() {
-               return "\"" + this.name + "\": " + this.value;
+               return "\"" +
+                       this.name +
+                       "\": " +
+                       this.value;
        }
-       
+
+       @Override
        public boolean equals(Object o) {       
                if (!(o instanceof MsoHeatEnvironmentResource)) {
                        return false;
@@ -71,13 +80,14 @@ public class MsoHeatEnvironmentResource {
                }
                return false;
        }
-       
+
+       @Override
        public int hashCode() {
                int result = 0;
                try {
                        result = this.name.hashCode();
                } catch (Exception e) {
-                       // in case it's null - return zero
+                   LOGGER.debug("Exception:", e);
                }
                return result;
        }