@@ -302,14 +302,16 @@ public static Version of(final String version) {
302302 *
303303 * @param creator the name or URL of the software that created your GPX
304304 * document. This allows others to inform the creator of a GPX
305- * instance document that fails to validate.
305+ * instance document that fails to validate. If the {@code creator}
306+ * is {@code null}, {@code "JPX - https://github.com/jenetics/jpx"}
307+ * is used instead.
306308 * @param version the GPX version
307309 * @param metadata the metadata about the GPS file
308310 * @param wayPoints the way-points
309311 * @param routes the routes
310312 * @param tracks the tracks
311313 * @param extensions the XML extensions document
312- * @throws NullPointerException if the {@code creator} or {@code version} is
314+ * @throws NullPointerException if the {@code version} is
313315 * {@code null}
314316 */
315317 private GPX (
@@ -322,7 +324,7 @@ private GPX(
322324 final Document extensions
323325 ) {
324326 _version = requireNonNull (version );
325- _creator = requireNonNull ( creator ) ;
327+ _creator = creator != null ? creator : _CREATOR ;
326328 _metadata = metadata ;
327329 _wayPoints = copyOf (wayPoints );
328330 _routes = copyOf (routes );
@@ -1701,7 +1703,9 @@ public static Writer of(final Indent indent) {
17011703 *
17021704 * @param creator the name or URL of the software that created your GPX
17031705 * document. This allows others to inform the creator of a GPX
1704- * instance document that fails to validate.
1706+ * instance document that fails to validate. If the {@code creator}
1707+ * is {@code null}, {@code "JPX - https://github.com/jenetics/jpx"}
1708+ * is used instead.
17051709 * @param version the GPX version
17061710 * @param metadata the metadata about the GPS file
17071711 * @param wayPoints the way-points
@@ -1737,7 +1741,9 @@ public static GPX of(
17371741 *
17381742 * @param creator the name or URL of the software that created your GPX
17391743 * document. This allows others to inform the creator of a GPX
1740- * instance document that fails to validate.
1744+ * instance document that fails to validate. If the {@code creator}
1745+ * is {@code null}, {@code "JPX - https://github.com/jenetics/jpx"}
1746+ * is used instead.
17411747 * @param metadata the metadata about the GPS file
17421748 * @param wayPoints the way-points
17431749 * @param routes the routes
@@ -1771,7 +1777,9 @@ public static GPX of(
17711777 *
17721778 * @param creator the name or URL of the software that created your GPX
17731779 * document. This allows others to inform the creator of a GPX
1774- * instance document that fails to validate.
1780+ * instance document that fails to validate. If the {@code creator}
1781+ * is {@code null}, {@code "JPX - https://github.com/jenetics/jpx"}
1782+ * is used instead.
17751783 * @param metadata the metadata about the GPS file
17761784 * @param wayPoints the way-points
17771785 * @param routes the routes
@@ -1805,7 +1813,9 @@ public static GPX of(
18051813 *
18061814 * @param creator the name or URL of the software that created your GPX
18071815 * document. This allows others to inform the creator of a GPX
1808- * instance document that fails to validate.
1816+ * instance document that fails to validate. If the {@code creator}
1817+ * is {@code null}, {@code "JPX - https://github.com/jenetics/jpx"}
1818+ * is used instead.
18091819 * @param version the GPX version
18101820 * @param metadata the metadata about the GPS file
18111821 * @param wayPoints the way-points
0 commit comments