[MNG-7299] Simplify conditional expressions

This closes #583
This commit is contained in:
Arturo Bernal 2021-10-12 07:06:28 +02:00 committed by Michael Osipov
parent 20b6cec44a
commit 48fc4c9937
3 changed files with 7 additions and 11 deletions

View File

@ -126,7 +126,7 @@ public class FileProfileActivator
boolean fileExists = f.exists();
return missing ? !fileExists : fileExists;
return missing != fileExists;
}
@Override

View File

@ -113,7 +113,7 @@ public class OperatingSystemProfileActivator
boolean result = Os.isVersion( test );
return reverse ? !result : result;
return reverse != result;
}
private boolean determineArchMatch( String arch )
@ -129,7 +129,7 @@ public class OperatingSystemProfileActivator
boolean result = Os.isArch( test );
return reverse ? !result : result;
return reverse != result;
}
private boolean determineNameMatch( String name )
@ -145,7 +145,7 @@ public class OperatingSystemProfileActivator
boolean result = Os.isName( test );
return reverse ? !result : result;
return reverse != result;
}
private boolean determineFamilyMatch( String family )
@ -161,7 +161,7 @@ public class OperatingSystemProfileActivator
boolean result = Os.isFamily( test );
return reverse ? !result : result;
return reverse != result;
}
}

View File

@ -95,15 +95,11 @@ public class PropertyProfileActivator
}
// we have a value, so it has to match the system value...
boolean result = propValue.equals( sysValue );
return reverseValue ? !result : result;
return reverseValue != propValue.equals( sysValue );
}
else
{
boolean result = StringUtils.isNotEmpty( sysValue );
return reverseName ? !result : result;
return reverseName != StringUtils.isNotEmpty( sysValue );
}
}