Commit 906fb37c authored by Luc Maisonobe's avatar Luc Maisonobe

Fixed findbugs warnings.

parent cb6c0659
......@@ -77,8 +77,8 @@ public class EstimatedMeasurement<T extends ObservedMeasurement<T>> implements T
this.observedMeasurement = observedMeasurement;
this.iteration = iteration;
this.count = count;
this.states = states;
this.participants = participants;
this.states = states.clone();
this.participants = participants.clone();
this.stateDerivatives = new double[states.length][][];
this.parametersDerivatives = new IdentityHashMap<ParameterDriver, double[]>();
}
......
......@@ -247,7 +247,7 @@ public class StreamingOemWriter {
*/
private static final Locale STANDARDIZED_LOCALE = Locale.US;
/** String format used for all key/value pair lines. **/
private static final String KV_FORMAT = "%s = %s" + NEW_LINE;
private static final String KV_FORMAT = "%s = %s%n";
/** Factor for converting meters to km. */
private static final double M_TO_KM = 1e-3;
/** Suffix of the name of the inertial frame attached to a planet. */
......
......@@ -159,7 +159,7 @@ public class TDMFile {
* - a measurement, the value of the observation.
* @author Maxime Journot
*/
public class ObservationsBlock {
public static class ObservationsBlock {
/** Meta-data for the block. */
private TDMMetaData metaData;
......@@ -255,7 +255,7 @@ public class TDMFile {
* @see Keyword
* @author mjournot
*/
public class Observation {
public static class Observation {
/** CCSDS Keyword: the type of the observation. */
private String keyword;
......@@ -327,7 +327,7 @@ public class TDMFile {
* @author Maxime Journot
* @since 9.0
*/
public class TDMMetaData {
public static class TDMMetaData {
/** Time System used in the tracking data session. */
private CcsdsTimeScale timeSystem;
......
......@@ -217,13 +217,11 @@ public class TDMParser extends DefaultHandler {
*/
public TDMFile parse(final String fileName)
throws OrekitException {
final InputStream stream;
try {
stream = new FileInputStream(fileName);
} catch (IOException e) {
try (InputStream stream = new FileInputStream(fileName)) {
return parse(stream, fileName);
} catch (IOException ioe) {
throw new OrekitException(OrekitMessages.UNABLE_TO_FIND_FILE, fileName);
}
return parse(stream, fileName);
}
/** Parse a CCSDS Tracking Data Message.
......@@ -595,7 +593,7 @@ public class TDMParser extends DefaultHandler {
}
/** Handler for parsing KEYVALUE file formats. */
private class KeyValueHandler {
private static class KeyValueHandler {
/** ParseInfo object. */
private ParseInfo parseInfo;
......@@ -755,7 +753,7 @@ public class TDMParser extends DefaultHandler {
}
/** Handler for parsing XML file formats. */
private class XMLHandler extends DefaultHandler {
private static class XMLHandler extends DefaultHandler {
/** ParseInfo object. */
private ParseInfo parseInfo;
......
......@@ -417,7 +417,7 @@ public class DTM2000 implements Atmosphere {
}
/** Local holder for intermediate results ensuring the model is reentrant. */
private class Computation {
private static class Computation {
/** Number of days in current year. */
private final int day;
......@@ -886,7 +886,7 @@ public class DTM2000 implements Atmosphere {
/** Local holder for intermediate results ensuring the model is reentrant.
* @param <T> type of the field elements
*/
private class FieldComputation<T extends RealFieldElement<T>> {
private static class FieldComputation<T extends RealFieldElement<T>> {
/** Number of days in current year. */
private int day;
......
......@@ -90,14 +90,14 @@ public class KlobucharIonoCoefficientsLoader implements DataLoader {
* @return the alpha coefficients array
*/
public double[] getAlpha() {
return alpha;
return alpha.clone();
}
/** Returns the beta coefficients array.
* @return the beta coefficients array
*/
public double[] getBeta() {
return beta;
return beta.clone();
}
/** Returns the supported names of the loader.
......
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