Commit d94f8a41 authored by Luc Maisonobe's avatar Luc Maisonobe

fixed findbugs and javadoc warnings

parent 06b04c83
......@@ -30,6 +30,10 @@
<Class name="~.*\.DSSTPropagator\$MeanPlusShortPeriodicMapper$" />
<Bug pattern="SE_TRANSIENT_FIELD_NOT_RESTORED" />
</Match>
<Match>
<Class name="~.*\.GeographicZoneDetector$" />
<Bug pattern="SE_TRANSIENT_FIELD_NOT_RESTORED" />
</Match>
<!-- The following is an intentional behaviour, to be removed when class is suppressed -->
<Match>
......@@ -94,6 +98,12 @@
<Local name="HP" />
<Bug pattern="DLS_DEAD_LOCAL_STORE" />
</Match>
<!-- the approximate constants do belong to the model -->
<Match>
<Class name="~.*\.JB2006$"/>
<Bug pattern="CNT_ROUGH_CONSTANT_VALUE" />
</Match>
<!-- The following is a false positive from findbugs -->
<Match>
......
......@@ -152,9 +152,9 @@ public class DataProvidersManager {
/** Add a data provider to the supported list.
* @param provider data provider to add
* @see #removeProvider(Class)
* @see #removeProvider(DataProvider)
* @see #clearProviders()
* @see #isSupported(Class)
* @see #isSupported(DataProvider)
* @see #getProviders()
*/
public void addProvider(final DataProvider provider) {
......@@ -183,8 +183,8 @@ public class DataProvidersManager {
/** Remove all data providers.
* @see #addProvider(DataProvider)
* @see #removeProvider(Class)
* @see #isSupported(Class)
* @see #removeProvider(DataProvider)
* @see #isSupported(DataProvider)
* @see #getProviders()
*/
public void clearProviders() {
......@@ -212,9 +212,9 @@ public class DataProvidersManager {
/** Get an unmodifiable view of the list of supported providers.
* @return unmodifiable view of the list of supported providers
* @see #addProvider(DataProvider)
* @see #removeProvider(Class)
* @see #removeProvider(DataProvider)
* @see #clearProviders()
* @see #isSupported(Class)
* @see #isSupported(DataProvider)
*/
public List<DataProvider> getProviders() {
return Collections.unmodifiableList(providers);
......
......@@ -26,6 +26,7 @@ import java.net.URL;
import java.nio.channels.UnsupportedAddressTypeException;
import java.text.ParseException;
import java.util.Iterator;
import java.util.NoSuchElementException;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import java.util.zip.GZIPInputStream;
......@@ -287,7 +288,10 @@ public class ZipJarCrawler implements DataProvider {
/** {@inheritDoc} */
@Override
public EntryStream next() {
public EntryStream next() throws NoSuchElementException {
if (next == null) {
throw new NoSuchElementException();
}
return next;
}
......
......@@ -144,7 +144,6 @@ public class SP3Parser implements OrbitFileParser {
final SP3File file = pi.file;
@SuppressWarnings("resource")
final Scanner scanner = new Scanner(line).useDelimiter("\\s+").useLocale(Locale.US);
// CHECKSTYLE: stop FallThrough check
......@@ -162,7 +161,7 @@ public class SP3Parser implements OrbitFileParser {
pi.hasVelocityEntries = "V".equals(v.substring(1, 2));
final int year = Integer.valueOf(v.substring(2));
final int year = Integer.parseInt(v.substring(2));
final int month = scanner.nextInt();
final int day = scanner.nextInt();
final int hour = scanner.nextInt();
......@@ -206,7 +205,7 @@ public class SP3Parser implements OrbitFileParser {
// line 3 contains the number of satellites
case 3:
pi.maxSatellites = Integer.valueOf(line.substring(4, 6).trim());
pi.maxSatellites = Integer.parseInt(line.substring(4, 6).trim());
// fall-through intended - the line contains already the first entries
// the following 4 lines contain additional satellite ids
......@@ -236,7 +235,7 @@ public class SP3Parser implements OrbitFileParser {
int startIdx = 9;
while (satIdx < pi.maxSatellites && (startIdx + 3) <= lineLength) {
final SatelliteInformation satInfo = file.getSatellite(satIdx++);
final int exponent = Integer.valueOf(line.substring(startIdx, startIdx + 3).trim());
final int exponent = Integer.parseInt(line.substring(startIdx, startIdx + 3).trim());
// the accuracy is calculated as 2**exp (in m) -> can be safely
// converted to an integer as there will be no fraction
satInfo.setAccuracy((int) Math.pow(2d, exponent));
......@@ -340,12 +339,12 @@ public class SP3Parser implements OrbitFileParser {
switch (line.charAt(0)) {
case '*': {
final int year = Integer.valueOf(line.substring(3, 7).trim());
final int month = Integer.valueOf(line.substring(8, 10).trim());
final int day = Integer.valueOf(line.substring(11, 13).trim());
final int hour = Integer.valueOf(line.substring(14, 16).trim());
final int minute = Integer.valueOf(line.substring(17, 19).trim());
final double second = Double.valueOf(line.substring(20, 31).trim());
final int year = Integer.parseInt(line.substring(3, 7).trim());
final int month = Integer.parseInt(line.substring(8, 10).trim());
final int day = Integer.parseInt(line.substring(11, 13).trim());
final int hour = Integer.parseInt(line.substring(14, 16).trim());
final int minute = Integer.parseInt(line.substring(17, 19).trim());
final double second = Double.parseDouble(line.substring(20, 31).trim());
pi.latestEpoch = new AbsoluteDate(year, month, day,
hour, minute, second,
......@@ -359,15 +358,15 @@ public class SP3Parser implements OrbitFileParser {
if (!file.containsSatellite(satelliteId)) {
pi.latestPosition = null;
} else {
final double x = Double.valueOf(line.substring(4, 18).trim());
final double y = Double.valueOf(line.substring(18, 32).trim());
final double z = Double.valueOf(line.substring(32, 46).trim());
final double x = Double.parseDouble(line.substring(4, 18).trim());
final double y = Double.parseDouble(line.substring(18, 32).trim());
final double z = Double.parseDouble(line.substring(32, 46).trim());
// the position values are in km and have to be converted to m
pi.latestPosition = new Vector3D(x * 1000, y * 1000, z * 1000);
// clock (microsec)
pi.latestClock = Double.valueOf(line.substring(46, 60).trim());
pi.latestClock = Double.parseDouble(line.substring(46, 60).trim());
// the additional items are optional and not read yet
......@@ -412,14 +411,14 @@ public class SP3Parser implements OrbitFileParser {
final String satelliteId = line.substring(1, 4).trim();
if (file.containsSatellite(satelliteId)) {
final double xv = Double.valueOf(line.substring(4, 18).trim());
final double yv = Double.valueOf(line.substring(18, 32).trim());
final double zv = Double.valueOf(line.substring(32, 46).trim());
final double xv = Double.parseDouble(line.substring(4, 18).trim());
final double yv = Double.parseDouble(line.substring(18, 32).trim());
final double zv = Double.parseDouble(line.substring(32, 46).trim());
// the velocity values are in dm/s and have to be converted to m/s
final Vector3D velocity = new Vector3D(xv / 10d, yv / 10d, zv / 10d);
final double clockRateChange = Double.valueOf(line.substring(46, 60).trim());
final double clockRateChange = Double.parseDouble(line.substring(46, 60).trim());
// the additional items are optional and not read yet
......
......@@ -35,9 +35,9 @@ import org.orekit.utils.PVCoordinates;
* that can be provided to any {@link org.orekit.propagation.Propagator
* Propagator}.</p>
* <p>The maneuver is triggered when an underlying event generates a
* {@link org.orekit.propagation.events.EventDetector.Action#STOP STOP} event,
* {@link org.orekit.propagation.events.handlers.EventHandler.Action#STOP STOP} event,
* in which case this class will generate a {@link
* org.orekit.propagation.events.EventDetector.Action#RESET_STATE RESET_STATE}
* org.orekit.propagation.events.handlers.EventHandler.Action#RESET_STATE RESET_STATE}
* event (the stop event from the underlying object is therefore filtered out).
* In the simple cases, the underlying event detector may be a basic
* {@link org.orekit.propagation.events.DateDetector date event}, but it
......
......@@ -55,8 +55,8 @@ import org.orekit.utils.OrekitConfiguration;
* important ones being: {@link #getFrame(Predefined)}, {@link #getGCRF()},
* {@link #getCIRF(IERSConventions, boolean)} {@link #getTIRF(IERSConventions, boolean)},
* {@link #getITRF(IERSConventions, boolean)}, {@link #getEME2000()},
* {@link #getMOD(IERSConventions)}, {@link #getTOD(IERSConventions)},
* {@link #getGTOD(IERSConventions)}, {@link #getITRFEquinox(IERSConventions, boolean)},
* {@link #getMOD(IERSConventions)}, {@link #getTOD(IERSConventions, boolean)},
* {@link #getGTOD(IERSConventions, boolean)}, {@link #getITRFEquinox(IERSConventions, boolean)},
* {@link #getTEME()} and {@link #getVeis1950()}.
* </p>
* <h5> International Terrestrial Reference Frame</h5>
......
......@@ -235,7 +235,7 @@ public class SaastamoinenModel implements TroposphericDelayModel {
* Interpolation</a>. This is a stand-in until Apache Math has a
* bilinear interpolator
*/
private class BilinearInterpolatingFunction
private static class BilinearInterpolatingFunction
implements BivariateFunction {
/**
......@@ -373,7 +373,7 @@ public class SaastamoinenModel implements TroposphericDelayModel {
* Class that generates a bilinear interpolator.
* This is a stand-in until Apache Math has its own bi-linear interpolator
*/
private class BilinearInterpolator
private static class BilinearInterpolator
implements BivariateGridInterpolator {
@Override
......
......@@ -99,8 +99,7 @@ public class EquinoctialOrbit extends Orbit {
* @param hx tan(i/2) cos(Ω), first component of inclination vector
* @param hy tan(i/2) sin(Ω), second component of inclination vector
* @param l (M or E or v) + ω + Ω, mean, eccentric or true longitude argument (rad)
* @param type type of longitude argument, must be one of {@link #MEAN_LATITUDE_ARGUMENT},
* {@link #ECCENTRIC_LATITUDE_ARGUMENT} or {@link #TRUE_LATITUDE_ARGUMENT}
* @param type type of longitude argument
* @param frame the frame in which the parameters are defined
* (<em>must</em> be a {@link Frame#isPseudoInertial pseudo-inertial frame})
* @param date date of the orbital parameters
......
......@@ -259,7 +259,7 @@ public class Ephemeris extends AbstractAnalyticalPropagator implements BoundedPr
}
/** Internal PVCoordinatesProvider for attitude computation. */
private class LocalPVProvider implements PVCoordinatesProvider {
private static class LocalPVProvider implements PVCoordinatesProvider {
/** Current state. */
private SpacecraftState currentState;
......
......@@ -29,7 +29,7 @@ import org.orekit.time.AbsoluteDate;
*
* <p>As {@link EventDetector events detectors} are triggered during
* orbit propagation, an event specific {@link
* EventDetector.Action#eventOccurred(SpacecraftState, boolean) eventOccurred}
* EventDetector#eventOccurred(SpacecraftState, boolean) eventOccurred}
* method is called. This class can be used to add a global logging
* feature registering all events with their corresponding states in
* a chronological sequence (or reverse-chronological if propagation
......@@ -37,7 +37,7 @@ import org.orekit.time.AbsoluteDate;
* <p>This class works by wrapping user-provided {@link EventDetector
* events detectors} before they are registered to the propagator. The
* wrapper monitor the calls to {@link
* EventDetector.Action#eventOccurred(SpacecraftState, boolean) eventOccurred}
* EventDetector#eventOccurred(SpacecraftState, boolean) eventOccurred}
* and store the corresponding events as {@link LoggedEvent} instances.
* After propagation is complete, the user can retrieve all the events
* that have occurred at once by calling method {@link #getLoggedEvents()}.</p>
......@@ -141,7 +141,7 @@ public class EventsLogger implements Serializable {
/** Get the triggering state.
* @return triggering state
* @see EventDetector.Action#eventOccurred(SpacecraftState, boolean)
* @see EventDetector#eventOccurred(SpacecraftState, boolean)
*/
public SpacecraftState getState() {
return state;
......@@ -149,7 +149,7 @@ public class EventsLogger implements Serializable {
/** Get the Increasing/decreasing status of the event.
* @return increasing/decreasing status of the event
* @see EventDetector.Action#eventOccurred(SpacecraftState, boolean)
* @see EventDetector#eventOccurred(SpacecraftState, boolean)
*/
public boolean isIncreasing() {
return increasing;
......
......@@ -59,8 +59,8 @@ public class NodeDetector extends AbstractDetector<NodeDetector> {
* to period/3 and to set the convergence threshold according to orbit size.</p>
* @param orbit initial orbit
* @param frame frame in which the equator is defined (typical
* values are {@link org.orekit.frames.FramesFactory#getEME2000() J<sub>2000</sub>} or
* {@link org.orekit.frames.FramesFactory#getITRF2005() ITRF 2005})
* values are {@link org.orekit.frames.FramesFactory#getEME2000() EME<sub>2000</sub>} or
* {@link org.orekit.frames.FramesFactory#getITRF(org.orekit.utils.IERSConventions, boolean) ITRF})
*/
public NodeDetector(final Orbit orbit, final Frame frame) {
this(1.0e-13 * orbit.getKeplerianPeriod(), orbit, frame);
......@@ -72,8 +72,8 @@ public class NodeDetector extends AbstractDetector<NodeDetector> {
* @param threshold convergence threshold (s)
* @param orbit initial orbit
* @param frame frame in which the equator is defined (typical
* values are {@link org.orekit.frames.FramesFactory#getEME2000() J<sub>2000</sub>} or
* {@link org.orekit.frames.FramesFactory#getITRF2005() ITRF 2005})
* values are {@link org.orekit.frames.FramesFactory#getEME2000() EME<sub>2000</sub>} or
* {@link org.orekit.frames.FramesFactory#getITRF(org.orekit.utils.IERSConventions, boolean) ITRF})
*/
public NodeDetector(final double threshold, final Orbit orbit, final Frame frame) {
this(2 * estimateNodesTimeSeparation(orbit) / 3, threshold,
......@@ -92,8 +92,8 @@ public class NodeDetector extends AbstractDetector<NodeDetector> {
* @param maxIter maximum number of iterations in the event time search
* @param handler event handler to call at event occurrences
* @param frame frame in which the equator is defined (typical
* values are {@link org.orekit.frames.FramesFactory#getEME2000() J<sub>2000</sub>} or
* {@link org.orekit.frames.FramesFactory#getITRF2005() ITRF 2005})
* values are {@link org.orekit.frames.FramesFactory#getEME2000() EME<sub>2000</sub>} or
* {@link org.orekit.frames.FramesFactory#getITRF(org.orekit.utils.IERSConventions, boolean) ITRF})
* @since 6.1
*/
private NodeDetector(final double maxCheck, final double threshold,
......
......@@ -41,15 +41,9 @@
* <li>{@link org.orekit.propagation.events.AltitudeDetector AltitudeDetector}
* detects altitude crossing (and by default stop at descending)
* </li>
* <li>{@link org.orekit.propagation.events.ApparentElevationDetector ApparentElevationDetector}
* detects apparent satellite raising/setting (and by default stop at setting)
* </li>
* <li>{@link org.orekit.propagation.events.ApsideDetector ApsideDetector}
* detects apside crossing (and by default stop at perigee)
* </li>
* <li>{@link org.orekit.propagation.events.GroundMaskElevationDetector GroundMaskElevationDetector}
* detects satellite raising/setting according to an elevation mask (and by default stop at setting)
* </li>
* <li>{@link org.orekit.propagation.events.CircularFieldOfViewDetector CircularFieldOfViewDetector}
* detects target entry/exit a satellite sensor field of view with a circular boundary
* (and by default continue on entry and stop on exit)
......@@ -67,6 +61,9 @@
* <li>{@link org.orekit.propagation.events.ElevationDetector ElevationDetector}
* detects satellite raising/setting (and by default stop at setting)
* </li>
* <li>{@link org.orekit.propagation.events.GeographicZoneDetector GeographicZoneDetector}
* detects geographic boundaries crossings (and by default stop at zone exit)
* </li>
* <li>{@link org.orekit.propagation.events.NodeDetector NodeDetector}
* detects node crossing (and by default stop at ascending node)
* </li>
......
......@@ -1614,7 +1614,7 @@ public abstract class AbstractGaussianContribution implements DSSTForceModel {
* @author Petre Bazavan
* @author Lucian Barbulescu
*/
private class UijVijCoefficients {
private static class UijVijCoefficients {
/** The U₁<sup>j</sup> coefficients.
* <p>
......
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