Skip to content
Snippets Groups Projects
Commit afeb0706 authored by Luc Maisonobe's avatar Luc Maisonobe
Browse files

Dont check for null before instanceof.

Instanceof already performs the check, so it's a duplicate.
parent 2ac17cd6
No related branches found
No related tags found
No related merge requests found
......@@ -79,7 +79,7 @@ class XmlLexicalAnalyzer implements LexicalAnalyzer {
} catch (SAXException se) {
final OrekitException oe;
if (se.getException() != null && se.getException() instanceof OrekitException) {
if (se.getException() instanceof OrekitException) {
oe = (OrekitException) se.getException();
} else {
oe = new OrekitException(se, new DummyLocalizable(se.getMessage()));
......
......@@ -168,7 +168,7 @@ public class EOPHistory implements Serializable {
* @return true if the instance uses interpolation on tidal corrections
*/
public boolean usesInterpolation() {
return tidalCorrection != null && tidalCorrection instanceof CachedCorrection;
return tidalCorrection instanceof CachedCorrection;
}
/** Get the IERS conventions to which these EOP apply.
......
......@@ -131,7 +131,7 @@ class RapidDataAndPredictionXMLLoader extends AbstractEopLoader
return history;
} catch (SAXException se) {
if (se.getCause() != null && se.getCause() instanceof OrekitException) {
if (se.getCause() instanceof OrekitException) {
throw (OrekitException) se.getCause();
}
throw new OrekitException(se, LocalizedCoreFormats.SIMPLE_MESSAGE, se.getMessage());
......
......@@ -264,7 +264,7 @@ public class JacobiPolynomials {
@Override
public boolean equals(final Object key) {
if (key == null || !(key instanceof JacobiKey)) {
if (!(key instanceof JacobiKey)) {
return false;
}
......
......@@ -1192,7 +1192,7 @@ public class AbsoluteDate
return true;
}
if (date != null && date instanceof AbsoluteDate) {
if (date instanceof AbsoluteDate) {
return durationFrom((AbsoluteDate) date) == 0;
}
......
......@@ -1365,7 +1365,7 @@ public class FieldAbsoluteDate<T extends RealFieldElement<T>>
return true;
}
if (date != null && date instanceof FieldAbsoluteDate) {
if (date instanceof FieldAbsoluteDate) {
return durationFrom((FieldAbsoluteDate<T>) date).getReal() == 0.0;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment