openecomp-be code coverage increase
[sdc.git] / openecomp-be / lib / openecomp-sdc-tosca-generator-lib / openecomp-sdc-tosca-generator-api / src / main / java / org / openecomp / sdc / generator / datatypes / tosca / LicenseFlavor.java
index 2a1b765..b7f9dd8 100644 (file)
@@ -16,6 +16,8 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  * ============LICENSE_END=========================================================
+ * Modifications copyright (c) 2019 Nokia
+ * ================================================================================
  */
 
 package org.openecomp.sdc.generator.datatypes.tosca;
@@ -44,16 +46,16 @@ public class LicenseFlavor {
   public boolean equals(Object obj) {
     if (this == obj)
       return true;
-    if (obj != null && getClass() != obj.getClass())
+    if (obj == null || getClass() != obj.getClass())
       return false;
     LicenseFlavor other = (LicenseFlavor) obj;
-    if (other != null) {
+
       if (this.feature_group_uuid == null) {
         if (other.feature_group_uuid != null)
           return false;
       } else if (!feature_group_uuid.equals(other.feature_group_uuid))
         return false;
-    }
+
     return true;
   }