diff --git a/pom.xml b/pom.xml index c9506f1149..c878802edc 100644 --- a/pom.xml +++ b/pom.xml @@ -226,6 +226,9 @@ Daniel Aguilar Taboada + + Julien Asquier + Louis Aucouturier @@ -286,6 +289,9 @@ Andrea Fiorentino + + Brad Hards + Romaric Her @@ -316,6 +322,9 @@ Vincent Mouraux + + Theo Nguyen + Lars Næsbye Christensen @@ -343,6 +352,9 @@ Mathieu Roméro + + Li Rongwang + Chiara Rusconi @@ -1101,7 +1113,7 @@ - 1C + 0.5C @{argLine} -Xmx2048m diff --git a/src/changes/changes.xml b/src/changes/changes.xml index 00cf749f46..40f076bcc2 100644 --- a/src/changes/changes.xml +++ b/src/changes/changes.xml @@ -20,7 +20,7 @@ Orekit Changes - + + Enhanced parsing of CRD files. + + + Limit use of synchronization in LazyLoadedTimeScales. + Removed unused static variables in DTM2000. diff --git a/src/design/data-filtering-class-diagram.puml b/src/design/data-filtering-class-diagram.puml index a2db1c3abc..3e51d2544c 100644 --- a/src/design/data-filtering-class-diagram.puml +++ b/src/design/data-filtering-class-diagram.puml @@ -63,15 +63,15 @@ DataFilter <|-- GzipFilter DataFilter <|-- UnixFilter - UnixFilter --> DataSource.Opener : creates - GzipFilter --> DataSource.Opener : creates + UnixFilter --> Opener : creates + GzipFilter --> Opener : creates } package files.rinex #DDEBD8 { class HatanakaCompressFilter DataFilter <|-- HatanakaCompressFilter - DataSource.Opener <-left- HatanakaCompressFilter : creates + Opener <-left- HatanakaCompressFilter : creates } } diff --git a/src/main/java/org/orekit/gnss/metric/ntrip/NtripClient.java b/src/main/java/org/orekit/gnss/metric/ntrip/NtripClient.java index d357152eef..939129534c 100644 --- a/src/main/java/org/orekit/gnss/metric/ntrip/NtripClient.java +++ b/src/main/java/org/orekit/gnss/metric/ntrip/NtripClient.java @@ -459,6 +459,7 @@ public void stopStreaming(final int time) { try { // wait for proper ending + executorService.shutdown(); executorService.awaitTermination(time, TimeUnit.MILLISECONDS); } catch (InterruptedException ie) { // Restore interrupted state... diff --git a/src/main/java/org/orekit/propagation/FieldSpacecraftState.java b/src/main/java/org/orekit/propagation/FieldSpacecraftState.java index 6e8aa1fd12..7f237778ba 100644 --- a/src/main/java/org/orekit/propagation/FieldSpacecraftState.java +++ b/src/main/java/org/orekit/propagation/FieldSpacecraftState.java @@ -720,14 +720,14 @@ public FieldOrbit getOrbit() throws OrekitIllegalStateException { /** {@inheritDoc} */ @Override public FieldAbsoluteDate getDate() { - return (isOrbitDefined()) ? orbit.getDate() : absPva.getDate(); + return isOrbitDefined() ? orbit.getDate() : absPva.getDate(); } /** Get the defining frame. * @return the frame in which state is defined */ public Frame getFrame() { - return (isOrbitDefined()) ? orbit.getFrame() : absPva.getFrame(); + return isOrbitDefined() ? orbit.getFrame() : absPva.getFrame(); } @@ -892,7 +892,7 @@ public FieldStaticTransform toStaticTransform() { * state contains an absolute position-velocity-acceleration rather than an orbit */ public T getMu() { - return (isOrbitDefined()) ? orbit.getMu() : absPva.getDate().getField().getZero().add(Double.NaN); + return isOrbitDefined() ? orbit.getMu() : absPva.getDate().getField().getZero().add(Double.NaN); } /** Get the Keplerian period. @@ -903,7 +903,7 @@ public T getMu() { * than an orbit */ public T getKeplerianPeriod() { - return (isOrbitDefined()) ? orbit.getKeplerianPeriod() : absPva.getDate().getField().getZero().add(Double.NaN); + return isOrbitDefined() ? orbit.getKeplerianPeriod() : absPva.getDate().getField().getZero().add(Double.NaN); } /** Get the Keplerian mean motion. @@ -914,7 +914,7 @@ public T getKeplerianPeriod() { * than an orbit */ public T getKeplerianMeanMotion() { - return (isOrbitDefined()) ? orbit.getKeplerianMeanMotion() : absPva.getDate().getField().getZero().add(Double.NaN); + return isOrbitDefined() ? orbit.getKeplerianMeanMotion() : absPva.getDate().getField().getZero().add(Double.NaN); } /** Get the semi-major axis. @@ -923,7 +923,7 @@ public T getKeplerianMeanMotion() { * than an orbit */ public T getA() { - return (isOrbitDefined()) ? orbit.getA() : absPva.getDate().getField().getZero().add(Double.NaN); + return isOrbitDefined() ? orbit.getA() : absPva.getDate().getField().getZero().add(Double.NaN); } /** Get the first component of the eccentricity vector (as per equinoctial parameters). @@ -933,7 +933,7 @@ public T getA() { * @see #getE() */ public T getEquinoctialEx() { - return (isOrbitDefined()) ? orbit.getEquinoctialEx() : absPva.getDate().getField().getZero().add(Double.NaN); + return isOrbitDefined() ? orbit.getEquinoctialEx() : absPva.getDate().getField().getZero().add(Double.NaN); } /** Get the second component of the eccentricity vector (as per equinoctial parameters). @@ -943,7 +943,7 @@ public T getEquinoctialEx() { * @see #getE() */ public T getEquinoctialEy() { - return (isOrbitDefined()) ? orbit.getEquinoctialEy() : absPva.getDate().getField().getZero().add(Double.NaN); + return isOrbitDefined() ? orbit.getEquinoctialEy() : absPva.getDate().getField().getZero().add(Double.NaN); } /** Get the first component of the inclination vector (as per equinoctial parameters). @@ -953,7 +953,7 @@ public T getEquinoctialEy() { * @see #getI() */ public T getHx() { - return (isOrbitDefined()) ? orbit.getHx() : absPva.getDate().getField().getZero().add(Double.NaN); + return isOrbitDefined() ? orbit.getHx() : absPva.getDate().getField().getZero().add(Double.NaN); } /** Get the second component of the inclination vector (as per equinoctial parameters). @@ -963,7 +963,7 @@ public T getHx() { * @see #getI() */ public T getHy() { - return (isOrbitDefined()) ? orbit.getHy() : absPva.getDate().getField().getZero().add(Double.NaN); + return isOrbitDefined() ? orbit.getHy() : absPva.getDate().getField().getZero().add(Double.NaN); } /** Get the true latitude argument (as per equinoctial parameters). @@ -974,7 +974,7 @@ public T getHy() { * @see #getLM() */ public T getLv() { - return (isOrbitDefined()) ? orbit.getLv() : absPva.getDate().getField().getZero().add(Double.NaN); + return isOrbitDefined() ? orbit.getLv() : absPva.getDate().getField().getZero().add(Double.NaN); } /** Get the eccentric latitude argument (as per equinoctial parameters). @@ -985,7 +985,7 @@ public T getLv() { * @see #getLM() */ public T getLE() { - return (isOrbitDefined()) ? orbit.getLE() : absPva.getDate().getField().getZero().add(Double.NaN); + return isOrbitDefined() ? orbit.getLE() : absPva.getDate().getField().getZero().add(Double.NaN); } /** Get the mean longitude argument (as per equinoctial parameters). @@ -996,7 +996,7 @@ public T getLE() { * @see #getLE() */ public T getLM() { - return (isOrbitDefined()) ? orbit.getLM() : absPva.getDate().getField().getZero().add(Double.NaN); + return isOrbitDefined() ? orbit.getLM() : absPva.getDate().getField().getZero().add(Double.NaN); } // Additional orbital elements @@ -1009,7 +1009,7 @@ public T getLM() { * @see #getEquinoctialEy() */ public T getE() { - return (isOrbitDefined()) ? orbit.getE() : absPva.getDate().getField().getZero().add(Double.NaN); + return isOrbitDefined() ? orbit.getE() : absPva.getDate().getField().getZero().add(Double.NaN); } /** Get the inclination. @@ -1018,7 +1018,7 @@ public T getE() { * @see #getHy() */ public T getI() { - return (isOrbitDefined()) ? orbit.getI() : absPva.getDate().getField().getZero().add(Double.NaN); + return isOrbitDefined() ? orbit.getI() : absPva.getDate().getField().getZero().add(Double.NaN); } /** Get the position in orbit definition frame. @@ -1026,7 +1026,7 @@ public T getI() { * @since 12.0 */ public FieldVector3D getPosition() { - return (isOrbitDefined()) ? orbit.getPosition() : absPva.getPosition(); + return isOrbitDefined() ? orbit.getPosition() : absPva.getPosition(); } /** Get the {@link TimeStampedFieldPVCoordinates} in orbit definition frame. @@ -1040,7 +1040,7 @@ public FieldVector3D getPosition() { * @return pvCoordinates in orbit definition frame */ public TimeStampedFieldPVCoordinates getPVCoordinates() { - return (isOrbitDefined()) ? orbit.getPVCoordinates() : absPva.getPVCoordinates(); + return isOrbitDefined() ? orbit.getPVCoordinates() : absPva.getPVCoordinates(); } /** Get the position in given output frame. @@ -1050,7 +1050,7 @@ public TimeStampedFieldPVCoordinates getPVCoordinates() { * @see #getPVCoordinates(Frame) */ public FieldVector3D getPosition(final Frame outputFrame) { - return (isOrbitDefined()) ? orbit.getPosition(outputFrame) : absPva.getPosition(outputFrame); + return isOrbitDefined() ? orbit.getPosition(outputFrame) : absPva.getPosition(outputFrame); } /** Get the {@link TimeStampedFieldPVCoordinates} in given output frame. @@ -1065,7 +1065,7 @@ public FieldVector3D getPosition(final Frame outputFrame) { * @return pvCoordinates in orbit definition frame */ public TimeStampedFieldPVCoordinates getPVCoordinates(final Frame outputFrame) { - return (isOrbitDefined()) ? orbit.getPVCoordinates(outputFrame) : absPva.getPVCoordinates(outputFrame); + return isOrbitDefined() ? orbit.getPVCoordinates(outputFrame) : absPva.getPVCoordinates(outputFrame); } /** Get the attitude. diff --git a/src/main/java/org/orekit/propagation/SpacecraftState.java b/src/main/java/org/orekit/propagation/SpacecraftState.java index 14e975f9c6..dc1f416715 100644 --- a/src/main/java/org/orekit/propagation/SpacecraftState.java +++ b/src/main/java/org/orekit/propagation/SpacecraftState.java @@ -603,7 +603,7 @@ public AbsoluteDate getDate() { * @return the frame in which state is defined */ public Frame getFrame() { - return (isOrbitDefined()) ? orbit.getFrame() : absPva.getFrame(); + return isOrbitDefined() ? orbit.getFrame() : absPva.getFrame(); } /** Check if an additional state is available. @@ -769,7 +769,7 @@ public StaticTransform toStaticTransform() { * state contains an absolute position-velocity-acceleration rather than an orbit */ public double getMu() { - return (isOrbitDefined()) ? orbit.getMu() : Double.NaN; + return isOrbitDefined() ? orbit.getMu() : Double.NaN; } /** Get the Keplerian period. @@ -780,7 +780,7 @@ public double getMu() { * than an orbit */ public double getKeplerianPeriod() { - return (isOrbitDefined()) ? orbit.getKeplerianPeriod() : Double.NaN; + return isOrbitDefined() ? orbit.getKeplerianPeriod() : Double.NaN; } /** Get the Keplerian mean motion. @@ -791,7 +791,7 @@ public double getKeplerianPeriod() { * than an orbit */ public double getKeplerianMeanMotion() { - return (isOrbitDefined()) ? orbit.getKeplerianMeanMotion() : Double.NaN; + return isOrbitDefined() ? orbit.getKeplerianMeanMotion() : Double.NaN; } /** Get the semi-major axis. @@ -800,7 +800,7 @@ public double getKeplerianMeanMotion() { * than an orbit */ public double getA() { - return (isOrbitDefined()) ? orbit.getA() : Double.NaN; + return isOrbitDefined() ? orbit.getA() : Double.NaN; } /** Get the first component of the eccentricity vector (as per equinoctial parameters). @@ -810,7 +810,7 @@ public double getA() { * @see #getE() */ public double getEquinoctialEx() { - return (isOrbitDefined()) ? orbit.getEquinoctialEx() : Double.NaN; + return isOrbitDefined() ? orbit.getEquinoctialEx() : Double.NaN; } /** Get the second component of the eccentricity vector (as per equinoctial parameters). @@ -820,7 +820,7 @@ public double getEquinoctialEx() { * @see #getE() */ public double getEquinoctialEy() { - return (isOrbitDefined()) ? orbit.getEquinoctialEy() : Double.NaN; + return isOrbitDefined() ? orbit.getEquinoctialEy() : Double.NaN; } /** Get the first component of the inclination vector (as per equinoctial parameters). @@ -830,7 +830,7 @@ public double getEquinoctialEy() { * @see #getI() */ public double getHx() { - return (isOrbitDefined()) ? orbit.getHx() : Double.NaN; + return isOrbitDefined() ? orbit.getHx() : Double.NaN; } /** Get the second component of the inclination vector (as per equinoctial parameters). @@ -840,7 +840,7 @@ public double getHx() { * @see #getI() */ public double getHy() { - return (isOrbitDefined()) ? orbit.getHy() : Double.NaN; + return isOrbitDefined() ? orbit.getHy() : Double.NaN; } /** Get the true latitude argument (as per equinoctial parameters). @@ -851,7 +851,7 @@ public double getHy() { * @see #getLM() */ public double getLv() { - return (isOrbitDefined()) ? orbit.getLv() : Double.NaN; + return isOrbitDefined() ? orbit.getLv() : Double.NaN; } /** Get the eccentric latitude argument (as per equinoctial parameters). @@ -862,7 +862,7 @@ public double getLv() { * @see #getLM() */ public double getLE() { - return (isOrbitDefined()) ? orbit.getLE() : Double.NaN; + return isOrbitDefined() ? orbit.getLE() : Double.NaN; } /** Get the mean longitude argument (as per equinoctial parameters). @@ -873,7 +873,7 @@ public double getLE() { * @see #getLE() */ public double getLM() { - return (isOrbitDefined()) ? orbit.getLM() : Double.NaN; + return isOrbitDefined() ? orbit.getLM() : Double.NaN; } // Additional orbital elements @@ -886,7 +886,7 @@ public double getLM() { * @see #getEquinoctialEy() */ public double getE() { - return (isOrbitDefined()) ? orbit.getE() : Double.NaN; + return isOrbitDefined() ? orbit.getE() : Double.NaN; } /** Get the inclination. @@ -895,7 +895,7 @@ public double getE() { * @see #getHy() */ public double getI() { - return (isOrbitDefined()) ? orbit.getI() : Double.NaN; + return isOrbitDefined() ? orbit.getI() : Double.NaN; } /** Get the position in orbit definition frame. @@ -904,7 +904,7 @@ public double getI() { * @see #getPVCoordinates() */ public Vector3D getPosition() { - return (isOrbitDefined()) ? orbit.getPosition() : absPva.getPosition(); + return isOrbitDefined() ? orbit.getPosition() : absPva.getPosition(); } /** Get the {@link TimeStampedPVCoordinates} in orbit definition frame. @@ -918,7 +918,7 @@ public Vector3D getPosition() { * @return pvCoordinates in orbit definition frame */ public TimeStampedPVCoordinates getPVCoordinates() { - return (isOrbitDefined()) ? orbit.getPVCoordinates() : absPva.getPVCoordinates(); + return isOrbitDefined() ? orbit.getPVCoordinates() : absPva.getPVCoordinates(); } /** Get the position in given output frame. @@ -928,7 +928,7 @@ public TimeStampedPVCoordinates getPVCoordinates() { * @see #getPVCoordinates(Frame) */ public Vector3D getPosition(final Frame outputFrame) { - return (isOrbitDefined()) ? orbit.getPosition(outputFrame) : absPva.getPosition(outputFrame); + return isOrbitDefined() ? orbit.getPosition(outputFrame) : absPva.getPosition(outputFrame); } /** Get the {@link TimeStampedPVCoordinates} in given output frame. @@ -943,7 +943,7 @@ public Vector3D getPosition(final Frame outputFrame) { * @return pvCoordinates in orbit definition frame */ public TimeStampedPVCoordinates getPVCoordinates(final Frame outputFrame) { - return (isOrbitDefined()) ? orbit.getPVCoordinates(outputFrame) : absPva.getPVCoordinates(outputFrame); + return isOrbitDefined() ? orbit.getPVCoordinates(outputFrame) : absPva.getPVCoordinates(outputFrame); } /** Get the attitude. diff --git a/src/main/java/org/orekit/time/LazyLoadedTimeScales.java b/src/main/java/org/orekit/time/LazyLoadedTimeScales.java index dce2607338..3d891c2dec 100644 --- a/src/main/java/org/orekit/time/LazyLoadedTimeScales.java +++ b/src/main/java/org/orekit/time/LazyLoadedTimeScales.java @@ -19,6 +19,7 @@ import java.util.ArrayList; import java.util.Collections; import java.util.List; +import java.util.concurrent.atomic.AtomicReference; import org.orekit.data.DataProvidersManager; import org.orekit.errors.OrekitException; @@ -44,41 +45,42 @@ public class LazyLoadedTimeScales extends AbstractTimeScales { /** UTCTAI offsets loaders. */ private final List loaders = new ArrayList<>(); + /** Universal Time Coordinate scale. */ - private UTCScale utc = null; + private AtomicReference utc = new AtomicReference<>(); /** International Atomic Time scale. */ - private TAIScale tai = null; + private AtomicReference tai = new AtomicReference<>(); /** Terrestrial Time scale. */ - private TTScale tt = null; + private AtomicReference tt = new AtomicReference<>(); /** Galileo System Time scale. */ - private GalileoScale gst = null; + private AtomicReference gst = new AtomicReference<>(); /** GLObal NAvigation Satellite System scale. */ - private GLONASSScale glonass = null; + private AtomicReference glonass = new AtomicReference<>(); /** Quasi-Zenith Satellite System scale. */ - private QZSSScale qzss = null; + private AtomicReference qzss = new AtomicReference<>(); /** Global Positioning System scale. */ - private GPSScale gps = null; + private AtomicReference gps = new AtomicReference<>(); /** Geocentric Coordinate Time scale. */ - private TCGScale tcg = null; + private AtomicReference tcg = new AtomicReference<>(); /** Barycentric Dynamic Time scale. */ - private TDBScale tdb = null; + private AtomicReference tdb = new AtomicReference<>(); /** Barycentric Coordinate Time scale. */ - private TCBScale tcb = null; + private AtomicReference tcb = new AtomicReference<>(); /** IRNSS System Time scale. */ - private IRNSSScale irnss = null; + private AtomicReference irnss = new AtomicReference<>(); /** BDS System Time scale. */ - private BDTScale bds = null; + private AtomicReference bds = new AtomicReference<>(); /** * Create a new set of time scales with the given sources of auxiliary data. This @@ -159,39 +161,41 @@ public void clearUTCTAIOffsetsLoaders() { @Override public TAIScale getTAI() { - synchronized (this) { - if (tai == null) { - tai = new TAIScale(); - } + TAIScale refTai = tai.get(); + if (refTai == null) { + tai.compareAndSet(null, new TAIScale()); + refTai = tai.get(); + } - return tai; + return refTai; - } } @Override public UTCScale getUTC() { - synchronized (this) { - if (utc == null) { - List entries = Collections.emptyList(); - if (loaders.isEmpty()) { - addDefaultUTCTAIOffsetsLoaders(); - } - for (UTCTAIOffsetsLoader loader : loaders) { - entries = loader.loadOffsets(); - if (!entries.isEmpty()) { - break; - } - } - if (entries.isEmpty()) { - throw new OrekitException(OrekitMessages.NO_IERS_UTC_TAI_HISTORY_DATA_LOADED); + + UTCScale refUtc = utc.get(); + if (refUtc == null) { + List entries = Collections.emptyList(); + if (loaders.isEmpty()) { + addDefaultUTCTAIOffsetsLoaders(); + } + for (UTCTAIOffsetsLoader loader : loaders) { + entries = loader.loadOffsets(); + if (!entries.isEmpty()) { + break; } - utc = new UTCScale(getTAI(), entries); } - - return utc; + if (entries.isEmpty()) { + throw new OrekitException(OrekitMessages.NO_IERS_UTC_TAI_HISTORY_DATA_LOADED); + } + utc.compareAndSet(null, new UTCScale(getTAI(), entries)); + refUtc = utc.get(); } + + return refUtc; + } @Override @@ -217,106 +221,106 @@ public UT1Scale getUT1(final EOPHistory history) { @Override public TTScale getTT() { - synchronized (this) { - if (tt == null) { - tt = new TTScale(); - } + TTScale refTt = tt.get(); + if (refTt == null) { + tt.compareAndSet(null, new TTScale()); + refTt = tt.get(); + } - return tt; + return refTt; - } } @Override public GalileoScale getGST() { - synchronized (this) { - if (gst == null) { - gst = new GalileoScale(); - } + GalileoScale refGst = gst.get(); + if (refGst == null) { + gst.compareAndSet(null, new GalileoScale()); + refGst = gst.get(); + } - return gst; + return refGst; - } } @Override public GLONASSScale getGLONASS() { - synchronized (this) { - if (glonass == null) { - glonass = new GLONASSScale(getUTC()); - } + GLONASSScale refGlonass = glonass.get(); + if (refGlonass == null) { + glonass.compareAndSet(null, new GLONASSScale(getUTC())); + refGlonass = glonass.get(); + } - return glonass; + return refGlonass; - } } @Override public QZSSScale getQZSS() { - synchronized (this) { - if (qzss == null) { - qzss = new QZSSScale(); - } + QZSSScale refQzss = qzss.get(); + if (refQzss == null) { + qzss.compareAndSet(null, new QZSSScale()); + refQzss = qzss.get(); + } - return qzss; + return refQzss; - } } @Override public GPSScale getGPS() { - synchronized (this) { - if (gps == null) { - gps = new GPSScale(); - } + GPSScale refGps = gps.get(); + if (refGps == null) { + gps.compareAndSet(null, new GPSScale()); + refGps = gps.get(); + } - return gps; + return refGps; - } } @Override public TCGScale getTCG() { - synchronized (this) { - if (tcg == null) { - tcg = new TCGScale(getTT(), getTAI()); - } + TCGScale refTcg = tcg.get(); + if (refTcg == null) { + tcg.compareAndSet(null, new TCGScale(getTT(), getTAI())); + refTcg = tcg.get(); + } - return tcg; + return refTcg; - } } @Override public TDBScale getTDB() { - synchronized (this) { - if (tdb == null) { - tdb = new TDBScale(getTT(), getJ2000Epoch()); - } + TDBScale refTdb = tdb.get(); + if (refTdb == null) { + tdb.compareAndSet(null, new TDBScale(getTT(), getJ2000Epoch())); + refTdb = tdb.get(); + } - return tdb; + return refTdb; - } } @Override public TCBScale getTCB() { - synchronized (this) { - if (tcb == null) { - tcb = new TCBScale(getTDB(), getTAI()); - } + TCBScale refTcb = tcb.get(); + if (refTcb == null) { + tcb.compareAndSet(null, new TCBScale(getTDB(), getTAI())); + refTcb = tcb.get(); + } - return tcb; + return refTcb; - } } @Override @@ -329,28 +333,28 @@ public GMSTScale getGMST(final IERSConventions conventions, final boolean simple @Override public IRNSSScale getIRNSS() { - synchronized (this) { - if (irnss == null) { - irnss = new IRNSSScale(); - } + IRNSSScale refIrnss = irnss.get(); + if (refIrnss == null) { + irnss.compareAndSet(null, new IRNSSScale()); + refIrnss = irnss.get(); + } - return irnss; + return refIrnss; - } } @Override public BDTScale getBDT() { - synchronized (this) { - if (bds == null) { - bds = new BDTScale(); - } + BDTScale refBds = bds.get(); + if (refBds == null) { + bds.compareAndSet(null, new BDTScale()); + refBds = bds.get(); + } - return bds; + return refBds; - } } } diff --git a/src/site/markdown/downloads.md.vm b/src/site/markdown/downloads.md.vm index 495af8a36c..a3a74d506c 100644 --- a/src/site/markdown/downloads.md.vm +++ b/src/site/markdown/downloads.md.vm @@ -45,7 +45,7 @@ with groupID org.orekit and artifactId orekit so maven internal mechanism will download automatically all artifacts and dependencies as required. -#set ( $versions = {"12.0": "2023-11-05", "11.3.3": "2023-06-30", "11.3.2": "2023-02-17", "11.3.1": "2022-12-24", "11.3": "2022-10-25", "11.2.1": "2022-08-01", "11.2": "2022-06-20", "11.1.2": "2022-04-27", "11.1.1": "2022-03-17", "11.1": "2022-02-14", "11.0.2": "2021-11-24", "11.0.1": "2021-10-22", "11.0": "2021-09-20", "10.3.1": "2021-06-16", "10.3": "2020-12-21", "10.2": "2020-07-14", "10.1": "2020-02-19", "10.0": "2019-06-24", "9.3.1": "2019-03-16", "9.3": "2019-01-25", "9.2": "2018-05-26","9.1": "2017-11-26","9.0.1": "2017-11-03","9.0": "2017-07-26","8.0.1": "2017-11-03","8.0": "2016-06-30","7.2.1": "2017-11-03","7.2": "2016-04-05","7.1": "2016-02-07","7.0": "2015-01-11","6.1": "2013-12-13","6.0": "2013-04-23","5.0.3": "2011-07-13","5.0.2": "2011-07-11","5.0.1": "2011-04-18"} ) +#set ( $versions = {"12.0": "2023-11-08", "11.3.3": "2023-06-30", "11.3.2": "2023-02-17", "11.3.1": "2022-12-24", "11.3": "2022-10-25", "11.2.1": "2022-08-01", "11.2": "2022-06-20", "11.1.2": "2022-04-27", "11.1.1": "2022-03-17", "11.1": "2022-02-14", "11.0.2": "2021-11-24", "11.0.1": "2021-10-22", "11.0": "2021-09-20", "10.3.1": "2021-06-16", "10.3": "2020-12-21", "10.2": "2020-07-14", "10.1": "2020-02-19", "10.0": "2019-06-24", "9.3.1": "2019-03-16", "9.3": "2019-01-25", "9.2": "2018-05-26","9.1": "2017-11-26","9.0.1": "2017-11-03","9.0": "2017-07-26","8.0.1": "2017-11-03","8.0": "2016-06-30","7.2.1": "2017-11-03","7.2": "2016-04-05","7.1": "2016-02-07","7.0": "2015-01-11","6.1": "2013-12-13","6.0": "2013-04-23","5.0.3": "2011-07-13","5.0.2": "2011-07-11","5.0.1": "2011-04-18"} ) #foreach( $version in $versions.entrySet() ) | package | link | diff --git a/src/test/java/org/orekit/models/earth/atmosphere/data/CssiSpaceWeatherLoaderTest.java b/src/test/java/org/orekit/models/earth/atmosphere/data/CssiSpaceWeatherLoaderTest.java index 5ac8bf934d..594f647ca3 100644 --- a/src/test/java/org/orekit/models/earth/atmosphere/data/CssiSpaceWeatherLoaderTest.java +++ b/src/test/java/org/orekit/models/earth/atmosphere/data/CssiSpaceWeatherLoaderTest.java @@ -32,6 +32,7 @@ import java.util.concurrent.Callable; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; +import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicReference; import java.util.stream.Collectors; @@ -411,6 +412,15 @@ void testIssue1072() { final AbsoluteDate currentDate = dates.get(i); Assertions.assertEquals(weatherData.get24HoursKp(currentDate), sortedComputedResults.get(i)); } + + try { + // wait for proper ending + service.shutdown(); + service.awaitTermination(5, TimeUnit.SECONDS); + } catch (InterruptedException ie) { + // Restore interrupted state... + Thread.currentThread().interrupt(); + } } catch (Exception e) { // Should not fail diff --git a/src/test/java/org/orekit/models/earth/atmosphere/data/MarshallSolarActivityFutureEstimationTest.java b/src/test/java/org/orekit/models/earth/atmosphere/data/MarshallSolarActivityFutureEstimationTest.java index d8fc2904ce..91f0bbb85a 100644 --- a/src/test/java/org/orekit/models/earth/atmosphere/data/MarshallSolarActivityFutureEstimationTest.java +++ b/src/test/java/org/orekit/models/earth/atmosphere/data/MarshallSolarActivityFutureEstimationTest.java @@ -71,6 +71,7 @@ import java.util.concurrent.Callable; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; +import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicReference; import java.util.stream.Collectors; @@ -657,6 +658,15 @@ void testIssue1072() { final AbsoluteDate currentDate = dates.get(i); Assertions.assertEquals(weatherData.get24HoursKp(currentDate), sortedComputedResults.get(i)); } + + try { + // wait for proper ending + service.shutdown(); + service.awaitTermination(5, TimeUnit.SECONDS); + } catch (InterruptedException ie) { + // Restore interrupted state... + Thread.currentThread().interrupt(); + } } catch (Exception e) { // Should not fail diff --git a/src/test/java/org/orekit/time/TimeStampedDoubleHermiteInterpolatorTest.java b/src/test/java/org/orekit/time/TimeStampedDoubleHermiteInterpolatorTest.java index 7399f1420a..0cd89665fc 100644 --- a/src/test/java/org/orekit/time/TimeStampedDoubleHermiteInterpolatorTest.java +++ b/src/test/java/org/orekit/time/TimeStampedDoubleHermiteInterpolatorTest.java @@ -10,6 +10,7 @@ import java.util.concurrent.Callable; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; +import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicInteger; class TimeStampedDoubleHermiteInterpolatorTest { @@ -60,6 +61,14 @@ void testIssue1164() throws InterruptedException { // Sum of 1*1 + 2*2 + 3*3 + ... final int expectedSum = sampleSize * (sampleSize + 1) * (2 * sampleSize + 1) / 6; Assertions.assertEquals(expectedSum, sum.get()); + try { + // wait for proper ending + service.shutdown(); + service.awaitTermination(5, TimeUnit.SECONDS); + } catch (InterruptedException ie) { + // Restore interrupted state... + Thread.currentThread().interrupt(); + } } /** Custom class for multi threading testing purpose */ diff --git a/src/test/java/org/orekit/time/TimeStampedFieldHermiteInterpolatorTest.java b/src/test/java/org/orekit/time/TimeStampedFieldHermiteInterpolatorTest.java index d926972cf8..a546356d20 100644 --- a/src/test/java/org/orekit/time/TimeStampedFieldHermiteInterpolatorTest.java +++ b/src/test/java/org/orekit/time/TimeStampedFieldHermiteInterpolatorTest.java @@ -29,6 +29,7 @@ import java.util.concurrent.Callable; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; +import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicInteger; class TimeStampedFieldHermiteInterpolatorTest { @@ -82,6 +83,14 @@ void testIssue1164() throws InterruptedException { // Sum of 1*1 + 2*2 + 3*3 + ... final int expectedSum = sampleSize * (sampleSize + 1) * (2 * sampleSize + 1) / 6; Assertions.assertEquals(expectedSum, sum.get()); + try { + // wait for proper ending + service.shutdown(); + service.awaitTermination(5, TimeUnit.SECONDS); + } catch (InterruptedException ie) { + // Restore interrupted state... + Thread.currentThread().interrupt(); + } } /** Custom class for multi threading testing purpose */