Commit f84f5098 authored by Bryan Cazabonne's avatar Bryan Cazabonne
Browse files

Updated Checkstyle UnnecessaryParenthesesCheck.

parent 70fa7738
Pipeline #1362 passed with stages
in 28 minutes and 21 seconds
......@@ -78,8 +78,8 @@ public enum ParsedUnitsBehavior {
@Override
public Unit select(final Unit message, final Unit standard) {
if (message == Unit.NONE ||
(Precision.equals(message.getScale(), standard.getScale(), 1) &&
message.sameDimension(standard))) {
Precision.equals(message.getScale(), standard.getScale(), 1) &&
message.sameDimension(standard)) {
return standard;
} else {
throw new OrekitException(OrekitMessages.INCOMPATIBLE_UNITS,
......
......@@ -152,7 +152,7 @@ public class CommonMetadata extends OdmMetadata {
final boolean isIcrf = referenceFrame.asCelestialBodyFrame() == CelestialBodyFrame.ICRF;
final boolean isSolarSystemBarycenter =
CelestialBodyFactory.SOLAR_SYSTEM_BARYCENTER.equals(center.getBody().getName());
if ((!(isMci || isIcrf) && CelestialBodyFactory.EARTH.equals(center.getBody().getName())) ||
if (!(isMci || isIcrf) && CelestialBodyFactory.EARTH.equals(center.getBody().getName()) ||
isMci && CelestialBodyFactory.MARS.equals(center.getBody().getName()) ||
isIcrf && isSolarSystemBarycenter) {
return referenceFrame.asFrame();
......
......@@ -246,7 +246,7 @@ public enum ManeuverFieldType {
*/
public void checkUnit(final Unit parsedUnit) {
if ((unit == Unit.NONE) ^ (parsedUnit == Unit.NONE) ||
(!(unit.sameDimension(parsedUnit) && Precision.equals(unit.getScale(), parsedUnit.getScale(), 1)))) {
!(unit.sameDimension(parsedUnit) && Precision.equals(unit.getScale(), parsedUnit.getScale(), 1))) {
throw new OrekitException(OrekitMessages.INCOMPATIBLE_UNITS,
unit.getName(), parsedUnit.getName());
}
......
......@@ -115,7 +115,7 @@ class Lexer {
}
// look for power
if ((start < end - 1) &&
if (start < end - 1 &&
unitSpecification.charAt(start) == '*' &&
unitSpecification.charAt(start + 1) == '*') {
// power indicator as **
......@@ -152,7 +152,7 @@ class Lexer {
}
// look for special case "0.5" (used by CCSDS for square roots)
if ((start < end - 2) &&
if (start < end - 2 &&
unitSpecification.charAt(start) == '0' &&
unitSpecification.charAt(start + 1) == '.' &&
unitSpecification.charAt(start + 2) == '5') {
......@@ -222,7 +222,7 @@ class Lexer {
int value = 0;
while (current < end) {
final int c = converter.convert(current);
if ((c >= '0') && (c <= '9')) {
if (c >= '0' && c <= '9') {
value = value * 10 + (c - '0');
++current;
} else {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment