Signed-off-by: Hector Oswaldo Caballero <hector.caballero@ericsson.com>
Change-Id: I5b2e12e012d5423e9b84c1c66a478960121ea212
}
private static boolean equals(Ref r1, Ref r2) {
- if (r1 == null || r2 == null)
+ if (r1 == null || r2 == null) {
return false;
+ }
if (r1.isSymbolic()) {
- if (!r2.isSymbolic())
- return false;
- return r1.getTarget().getName().equals(r2.getTarget().getName());
- } else {
- if (r2.isSymbolic()) {
- return false;
- }
- return Objects.equals(r1.getObjectId(), r2.getObjectId());
+ return r2.isSymbolic() && r1.getTarget().getName()
+ .equals(r2.getTarget().getName());
}
+ return !r2.isSymbolic()
+ && Objects.equals(r1.getObjectId(), r2.getObjectId());
}
/**