]> git.mxchange.org Git - jjobs-core.git/commitdiff
Please cherry-pick:
authorRoland Häder <haeder@ambroox.de>
Thu, 20 Feb 2020 10:00:53 +0000 (11:00 +0100)
committerRoland Häder <roland@mxchange.org>
Thu, 20 Feb 2020 20:55:17 +0000 (21:55 +0100)
- renamed local variable
- added comments

src/org/mxchange/jjobs/model/jobskill/JobPositionSkill.java

index 872a383bcd84853bf60b8e979a4c5c88c9e5c206..e154a7a65025f9cb3e5300b5c75eed4cf48e1993 100644 (file)
@@ -142,18 +142,21 @@ public class JobPositionSkill implements SkillableJobPosition {
                        return false;
                }
 
-               final SkillableJobPosition jobPosition = (SkillableJobPosition) object;
+               // Cast to wanted type
+               final SkillableJobPosition position = (SkillableJobPosition) object;
 
-               if (!Objects.equals(this.getSkillImportance(), jobPosition.getSkillImportance())) {
+               // Check all false conditions
+               if (!Objects.equals(this.getSkillImportance(), position.getSkillImportance())) {
                        return false;
-               } else if (!Objects.equals(this.getJobPosition(), jobPosition.getJobPosition())) {
+               } else if (!Objects.equals(this.getJobPosition(), position.getJobPosition())) {
                        return false;
-               } else if (!Objects.equals(this.getJobSkill(), jobPosition.getJobSkill())) {
+               } else if (!Objects.equals(this.getJobSkill(), position.getJobSkill())) {
                        return false;
-               } else if (!Objects.equals(this.getJobPositionSkillId(), jobPosition.getJobPositionSkillId())) {
+               } else if (!Objects.equals(this.getJobPositionSkillId(), position.getJobPositionSkillId())) {
                        return false;
                }
 
+               // Okay, entities are matching (not objects)
                return true;
        }