From 9deb86493e25b4cef50ea21a1b2005b14e279512 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Fri, 24 Jan 2025 17:37:35 +0000 Subject: [PATCH 1/3] Update scalafmt-core to 3.8.6 --- .scalafmt.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.scalafmt.conf b/.scalafmt.conf index 243e75f0e..9a063fbae 100644 --- a/.scalafmt.conf +++ b/.scalafmt.conf @@ -1,4 +1,4 @@ -version = "3.6.1" +version = "3.8.6" style = default maxColumn = 100 From cc9134f21f040edfe3740184cb2a30d855a776d7 Mon Sep 17 00:00:00 2001 From: Scala Steward Date: Fri, 24 Jan 2025 17:38:38 +0000 Subject: [PATCH 2/3] Reformat with scalafmt 3.8.6 Executed command: scalafmt --non-interactive --- build.sbt | 2 +- .../main/scala/java/util/SimpleTimeZone.scala | 4 +- .../src/main/scala/java/util/TimeZone.scala | 6 +- .../bp/chrono/HijrahDateConfigurator.scala | 2 +- .../bp/chrono/JapaneseChronology.scala | 6 +- .../org/threeten/bp/chrono/JapaneseDate.scala | 10 +-- .../org/threeten/bp/chrono/JapaneseEra.scala | 8 +- .../bp/chrono/internal/TTBPJapaneseEra.scala | 2 +- .../main/scala/java/util/SimpleTimeZone.scala | 4 +- .../src/main/scala/java/util/TimeZone.scala | 6 +- .../scala-2/org/threeten/bp/DayOfWeek.scala | 4 +- .../main/scala-2/org/threeten/bp/Month.scala | 4 +- .../TTBPDateTimeFormatterBuilder.scala | 4 +- .../org/threeten/bp/temporal/IsoFields.scala | 24 +++--- .../org/threeten/bp/zone/ZoneMap.scala | 4 +- .../bp/zone/ZoneOffsetTransitionRule.scala | 2 +- .../scala-3/org/threeten/bp/DayOfWeek.scala | 4 +- .../main/scala-3/org/threeten/bp/Month.scala | 4 +- .../TTBPDateTimeFormatterBuilder.scala | 4 +- .../bp/zone/ZoneOffsetTransitionRule.scala | 2 +- .../main/scala/org/threeten/bp/Clock.scala | 4 +- .../main/scala/org/threeten/bp/Duration.scala | 81 +++++++++---------- .../main/scala/org/threeten/bp/Instant.scala | 41 +++++----- .../scala/org/threeten/bp/LocalDate.scala | 51 ++++++------ .../scala/org/threeten/bp/LocalDateTime.scala | 81 +++++++++---------- .../scala/org/threeten/bp/LocalTime.scala | 54 ++++++------- .../main/scala/org/threeten/bp/MonthDay.scala | 8 +- .../org/threeten/bp/OffsetDateTime.scala | 72 ++++++++--------- .../scala/org/threeten/bp/OffsetTime.scala | 48 +++++------ .../main/scala/org/threeten/bp/Period.scala | 30 +++---- .../src/main/scala/org/threeten/bp/Year.scala | 28 +++---- .../scala/org/threeten/bp/YearMonth.scala | 32 ++++---- .../main/scala/org/threeten/bp/ZoneId.scala | 4 +- .../scala/org/threeten/bp/ZoneOffset.scala | 4 +- .../scala/org/threeten/bp/ZonedDateTime.scala | 76 ++++++++--------- .../threeten/bp/chrono/ChronoLocalDate.scala | 2 +- .../org/threeten/bp/chrono/ChronoPeriod.scala | 12 +-- .../bp/chrono/ChronoZonedDateTime.scala | 12 +-- .../org/threeten/bp/chrono/Chronology.scala | 14 ++-- .../org/threeten/bp/chrono/HijrahDate.scala | 8 +- .../org/threeten/bp/chrono/MinguoDate.scala | 2 +- .../threeten/bp/chrono/ThaiBuddhistDate.scala | 2 +- .../org/threeten/bp/chrono/package.scala | 8 +- .../threeten/bp/format/DateTimeBuilder.scala | 12 +-- .../bp/format/DateTimeFormatter.scala | 11 ++- .../bp/format/DateTimeFormatterBuilder.scala | 11 ++- .../bp/temporal/TemporalAccessor.scala | 2 +- .../org/threeten/bp/temporal/ValueRange.scala | 4 +- .../org/threeten/bp/temporal/WeekFields.scala | 2 +- .../bp/zone/ZoneOffsetTransition.scala | 2 +- .../threeten/bp/zone/ZoneRulesBuilder.scala | 2 +- .../threeten/bp/zone/ZoneRulesProvider.scala | 14 ++-- .../org/threeten/bp/ClassLoaderChecker.scala | 2 +- .../bp/temporal/MockFieldNoValue.scala | 22 ++--- .../bp/temporal/MockFieldNoValue.scala | 22 ++--- .../org/threeten/bp/AssertionsHelper.scala | 22 ++--- .../org/threeten/bp/MockSimplePeriod.scala | 4 +- .../scala/org/threeten/bp/Performance.scala | 32 ++++---- .../scala/org/threeten/bp/TestInstant.scala | 12 +-- .../org/threeten/bp/TestLocalDateTime.scala | 4 +- .../bp/TestOffsetDateTime_instants.scala | 2 +- .../bp/chrono/TestChronoLocalDate.scala | 2 +- .../bp/chrono/TestChronoLocalDateTime.scala | 2 +- .../bp/chrono/TestChronoZonedDateTime.scala | 2 +- .../bp/format/GenTestPrinterParser.scala | 6 +- .../bp/format/TestCharLiteralParser.scala | 2 +- .../threeten/bp/format/TestNumberParser.scala | 2 +- .../threeten/bp/format/TestZoneIdParser.scala | 2 +- .../bp/zone/TestZoneRulesBuilder.scala | 19 ++--- .../bp/zone/TestZoneRulesProvider.scala | 2 +- 70 files changed, 498 insertions(+), 503 deletions(-) diff --git a/build.sbt b/build.sbt index fd83abe4b..57dfca17d 100644 --- a/build.sbt +++ b/build.sbt @@ -143,7 +143,7 @@ lazy val core = crossProject(JVMPlatform, JSPlatform, NativePlatform) .in(file("core")) .settings(commonSettings) .settings( - name := "scala-java-time", + name := "scala-java-time", libraryDependencies += ("org.portable-scala" %%% "portable-scala-reflect" % "1.1.3") .cross(CrossVersion.for3Use2_13) ) diff --git a/core/js/src/main/scala/java/util/SimpleTimeZone.scala b/core/js/src/main/scala/java/util/SimpleTimeZone.scala index a67b120b5..e85193b6d 100644 --- a/core/js/src/main/scala/java/util/SimpleTimeZone.scala +++ b/core/js/src/main/scala/java/util/SimpleTimeZone.scala @@ -1,9 +1,9 @@ package java.util class SimpleTimeZone(rawOffset: Int, var ID: String) extends TimeZone { - override def getRawOffset = rawOffset + override def getRawOffset = rawOffset /* concrete methods */ - override def getID: String = ID + override def getID: String = ID override def setID(id: String): Unit = ID = id } diff --git a/core/js/src/main/scala/java/util/TimeZone.scala b/core/js/src/main/scala/java/util/TimeZone.scala index 018118c6c..d7b484235 100644 --- a/core/js/src/main/scala/java/util/TimeZone.scala +++ b/core/js/src/main/scala/java/util/TimeZone.scala @@ -51,11 +51,11 @@ object TimeZone { new SimpleTimeZone(offsetInMillis, timeZone) } - def getDefault: TimeZone = default + def getDefault: TimeZone = default def setDefault(timeZone: TimeZone): Unit = default = timeZone def getTimeZone(timeZone: String): TimeZone = getTimeZone(ZoneId.of(timeZone)) - def getTimeZone(zoneId: ZoneId): TimeZone = { + def getTimeZone(zoneId: ZoneId): TimeZone = { val rules = zoneId.getRules val offsetInMillis = rules.getStandardOffset(Instant.now).getTotalSeconds * 1000 new SimpleTimeZone(offsetInMillis, zoneId.getId) @@ -80,7 +80,7 @@ abstract class TimeZone extends Serializable with Cloneable { // def useDaylightTime: Boolean /* concrete methods */ - def getID: String = ID + def getID: String = ID def setID(id: String): Unit = ID = id def getDisplayName(daylight: Boolean, style: Int, locale: Locale): String = { diff --git a/core/jvm/src/main/scala/org/threeten/bp/chrono/HijrahDateConfigurator.scala b/core/jvm/src/main/scala/org/threeten/bp/chrono/HijrahDateConfigurator.scala index a4e3c0170..586058dda 100644 --- a/core/jvm/src/main/scala/org/threeten/bp/chrono/HijrahDateConfigurator.scala +++ b/core/jvm/src/main/scala/org/threeten/bp/chrono/HijrahDateConfigurator.scala @@ -88,7 +88,7 @@ object HijrahDateConfigurator { case _: NumberFormatException => throw new ParseException(s"Offset is not properly set at line $num.", num) } - val separatorIndex: Int = deviationElement.indexOf('-') + val separatorIndex: Int = deviationElement.indexOf('-') if (separatorIndex != -1) { val startDateStg: String = deviationElement.substring(0, separatorIndex) val endDateStg: String = deviationElement.substring(separatorIndex + 1, offsetIndex) diff --git a/core/jvm/src/main/scala/org/threeten/bp/chrono/JapaneseChronology.scala b/core/jvm/src/main/scala/org/threeten/bp/chrono/JapaneseChronology.scala index 8ac84a894..b28e57767 100644 --- a/core/jvm/src/main/scala/org/threeten/bp/chrono/JapaneseChronology.scala +++ b/core/jvm/src/main/scala/org/threeten/bp/chrono/JapaneseChronology.scala @@ -194,7 +194,7 @@ final class JapaneseChronology private () extends Chronology with Serializable { * @throws DateTimeException * if unable to create the date * @throws ClassCastException - * if the { @code era} is not a { @code JapaneseEra} + * if the {@code era} is not a {@code JapaneseEra} */ override def dateYearDay(era: Era, yearOfEra: Int, dayOfYear: Int): JapaneseDate = if (!era.isInstanceOf[JapaneseEra]) throw new ClassCastException("Era must be JapaneseEra") @@ -283,9 +283,9 @@ final class JapaneseChronology private () extends Chronology with Serializable { * @param eraValue * the era value * @return - * the Japanese { @code Era} for the given numeric era value + * the Japanese {@code Era} for the given numeric era value * @throws DateTimeException - * if { @code eraValue} is invalid + * if {@code eraValue} is invalid */ def eraOf(eraValue: Int): JapaneseEra = JapaneseEra.of(eraValue) diff --git a/core/jvm/src/main/scala/org/threeten/bp/chrono/JapaneseDate.scala b/core/jvm/src/main/scala/org/threeten/bp/chrono/JapaneseDate.scala index 8afc77eaa..482a3102e 100644 --- a/core/jvm/src/main/scala/org/threeten/bp/chrono/JapaneseDate.scala +++ b/core/jvm/src/main/scala/org/threeten/bp/chrono/JapaneseDate.scala @@ -222,7 +222,7 @@ object JapaneseDate { * @return * the date in Japanese calendar system, not null * @throws DateTimeException - * if unable to convert to a { @code JapaneseDate} + * if unable to convert to a {@code JapaneseDate} */ def from(temporal: TemporalAccessor): JapaneseDate = JapaneseChronology.INSTANCE.date(temporal) @@ -418,9 +418,9 @@ final class JapaneseDate private[chrono] ( * @param yearOfEra * the year-of-era to set in the returned date * @return - * a { @code JapaneseDate} based on this date with the requested year, never null + * a {@code JapaneseDate} based on this date with the requested year, never null * @throws DateTimeException - * if { @code year} is invalid + * if {@code year} is invalid */ private def withYear(era: JapaneseEra, yearOfEra: Int): JapaneseDate = { val year: Int = JapaneseChronology.INSTANCE.prolepticYear(era, yearOfEra) @@ -438,9 +438,9 @@ final class JapaneseDate private[chrono] ( * @param year * the year to set in the returned date * @return - * a { @code JapaneseDate} based on this date with the requested year-of-era, never null + * a {@code JapaneseDate} based on this date with the requested year-of-era, never null * @throws DateTimeException - * if { @code year} is invalid + * if {@code year} is invalid */ private def withYear(year: Int): JapaneseDate = withYear(getEra, year) diff --git a/core/jvm/src/main/scala/org/threeten/bp/chrono/JapaneseEra.scala b/core/jvm/src/main/scala/org/threeten/bp/chrono/JapaneseEra.scala index 91f702817..6997b626f 100644 --- a/core/jvm/src/main/scala/org/threeten/bp/chrono/JapaneseEra.scala +++ b/core/jvm/src/main/scala/org/threeten/bp/chrono/JapaneseEra.scala @@ -86,13 +86,13 @@ object JapaneseEra { * Obtains an instance of {@code JapaneseEra} from an {@code int} value. * * The {@link #SHOWA} era that contains 1970-01-01 (ISO calendar system) has the value 1 Later era - * is numbered 2 ({@link #HEISEI}). Earlier eras are numbered 0 ({@link #TAISHO}), - * -1 ({@link #MEIJI}), only Meiji and later eras are supported. + * is numbered 2 ({@link #HEISEI}). Earlier eras are numbered 0 ({@link #TAISHO}), -1 ({@link + * #MEIJI}), only Meiji and later eras are supported. * * @param japaneseEra * the era to represent * @return - * the { @code JapaneseEra} singleton, not null + * the {@code JapaneseEra} singleton, not null * @throws DateTimeException * if the value is invalid */ @@ -112,7 +112,7 @@ object JapaneseEra { * @param japaneseEra * the japaneseEra name; non-null * @return - * the { @code JapaneseEra} singleton, never null + * the {@code JapaneseEra} singleton, never null * @throws IllegalArgumentException * if there is not JapaneseEra with the specified name */ diff --git a/core/jvm/src/main/scala/org/threeten/bp/chrono/internal/TTBPJapaneseEra.scala b/core/jvm/src/main/scala/org/threeten/bp/chrono/internal/TTBPJapaneseEra.scala index 0506f526b..b56183eeb 100644 --- a/core/jvm/src/main/scala/org/threeten/bp/chrono/internal/TTBPJapaneseEra.scala +++ b/core/jvm/src/main/scala/org/threeten/bp/chrono/internal/TTBPJapaneseEra.scala @@ -19,7 +19,7 @@ object TTBPJapaneseEra { * @param name * the name * @return - * the { @code JapaneseEra} singleton, not null + * the {@code JapaneseEra} singleton, not null * @throws DateTimeException * if an additional era has already been registered */ diff --git a/core/native/src/main/scala/java/util/SimpleTimeZone.scala b/core/native/src/main/scala/java/util/SimpleTimeZone.scala index a67b120b5..e85193b6d 100644 --- a/core/native/src/main/scala/java/util/SimpleTimeZone.scala +++ b/core/native/src/main/scala/java/util/SimpleTimeZone.scala @@ -1,9 +1,9 @@ package java.util class SimpleTimeZone(rawOffset: Int, var ID: String) extends TimeZone { - override def getRawOffset = rawOffset + override def getRawOffset = rawOffset /* concrete methods */ - override def getID: String = ID + override def getID: String = ID override def setID(id: String): Unit = ID = id } diff --git a/core/native/src/main/scala/java/util/TimeZone.scala b/core/native/src/main/scala/java/util/TimeZone.scala index 5d172d48e..8dd3cdcc1 100644 --- a/core/native/src/main/scala/java/util/TimeZone.scala +++ b/core/native/src/main/scala/java/util/TimeZone.scala @@ -13,11 +13,11 @@ object TimeZone { // TODO: implement this functionality, perhaps using https://github.com/scala-native/scala-native/blob/master/posixlib/src/main/scala/scala/scalanative/posix/time.scala new SimpleTimeZone(0, "UTC") - def getDefault: TimeZone = default + def getDefault: TimeZone = default def setDefault(timeZone: TimeZone): Unit = default = timeZone def getTimeZone(timeZone: String): TimeZone = getTimeZone(ZoneId.of(timeZone)) - def getTimeZone(zoneId: ZoneId): TimeZone = { + def getTimeZone(zoneId: ZoneId): TimeZone = { val rules = zoneId.getRules val offsetInMillis = rules.getStandardOffset(Instant.now).getTotalSeconds * 1000 new SimpleTimeZone(offsetInMillis, zoneId.getId) @@ -42,7 +42,7 @@ abstract class TimeZone extends Serializable with Cloneable { // def useDaylightTime: Boolean /* concrete methods */ - def getID: String = ID + def getID: String = ID def setID(id: String): Unit = ID = id def getDisplayName(daylight: Boolean, style: Int, locale: Locale): String = { diff --git a/core/shared/src/main/scala-2/org/threeten/bp/DayOfWeek.scala b/core/shared/src/main/scala-2/org/threeten/bp/DayOfWeek.scala index c77d2bf23..d7eef8cc7 100644 --- a/core/shared/src/main/scala-2/org/threeten/bp/DayOfWeek.scala +++ b/core/shared/src/main/scala-2/org/threeten/bp/DayOfWeek.scala @@ -159,7 +159,7 @@ object DayOfWeek { * @return * the day-of-week, not null * @throws DateTimeException - * if unable to convert to a { @code DayOfWeek} + * if unable to convert to a {@code DayOfWeek} */ def from(temporal: TemporalAccessor): DayOfWeek = { temporal match { @@ -288,7 +288,7 @@ final class DayOfWeek(name: String, ordinal: Int) * @throws DateTimeException * if a value for the field cannot be obtained * @throws DateTimeException - * if the range of valid values for the field exceeds an { @code int} + * if the range of valid values for the field exceeds an {@code int} * @throws DateTimeException * if the value is outside the range of valid values for the field * @throws ArithmeticException diff --git a/core/shared/src/main/scala-2/org/threeten/bp/Month.scala b/core/shared/src/main/scala-2/org/threeten/bp/Month.scala index f6a778cf7..c546e7f97 100644 --- a/core/shared/src/main/scala-2/org/threeten/bp/Month.scala +++ b/core/shared/src/main/scala-2/org/threeten/bp/Month.scala @@ -205,7 +205,7 @@ object Month { * @return * the month-of-year, not null * @throws DateTimeException - * if unable to convert to a { @code Month} + * if unable to convert to a {@code Month} */ def from(temporal: TemporalAccessor): Month = { var _temporal = temporal @@ -338,7 +338,7 @@ final class Month private (name: String, ordinal: Int) * @throws DateTimeException * if a value for the field cannot be obtained * @throws DateTimeException - * if the range of valid values for the field exceeds an { @code int} + * if the range of valid values for the field exceeds an {@code int} * @throws DateTimeException * if the value is outside the range of valid values for the field * @throws ArithmeticException diff --git a/core/shared/src/main/scala-2/org/threeten/bp/format/internal/TTBPDateTimeFormatterBuilder.scala b/core/shared/src/main/scala-2/org/threeten/bp/format/internal/TTBPDateTimeFormatterBuilder.scala index 77d3e484f..5cd5b0e96 100644 --- a/core/shared/src/main/scala-2/org/threeten/bp/format/internal/TTBPDateTimeFormatterBuilder.scala +++ b/core/shared/src/main/scala-2/org/threeten/bp/format/internal/TTBPDateTimeFormatterBuilder.scala @@ -282,8 +282,8 @@ object TTBPDateTimeFormatterBuilder { * @param signStyle * the positive/negative sign style, not null * @param subsequentWidth - * the width of subsequent non-negative numbers, 0 or greater, - * -1 if fixed width due to active adjacent parsing + * the width of subsequent non-negative numbers, 0 or greater, -1 if fixed width due to active + * adjacent parsing */ private[format] class NumberPrinterParser private[format] ( private[format] val field: TemporalField, diff --git a/core/shared/src/main/scala-2/org/threeten/bp/temporal/IsoFields.scala b/core/shared/src/main/scala-2/org/threeten/bp/temporal/IsoFields.scala index 50ac10304..8e31667f8 100644 --- a/core/shared/src/main/scala-2/org/threeten/bp/temporal/IsoFields.scala +++ b/core/shared/src/main/scala-2/org/threeten/bp/temporal/IsoFields.scala @@ -259,13 +259,13 @@ object IsoFields { private def QY = "QuarterOfYear" lazy val QUARTER_OF_YEAR: Field = new Field("QUARTER_OF_YEAR", 1) { - override def toString: String = QY - def getBaseUnit: TemporalUnit = QUARTER_YEARS - def getRangeUnit: TemporalUnit = YEARS - def range: ValueRange = ValueRange.of(1, 4) - def isSupportedBy(temporal: TemporalAccessor): Boolean = + override def toString: String = QY + def getBaseUnit: TemporalUnit = QUARTER_YEARS + def getRangeUnit: TemporalUnit = YEARS + def range: ValueRange = ValueRange.of(1, 4) + def isSupportedBy(temporal: TemporalAccessor): Boolean = temporal.isSupported(MONTH_OF_YEAR) && isIso(temporal) - def rangeRefinedBy(temporal: TemporalAccessor): ValueRange = range + def rangeRefinedBy(temporal: TemporalAccessor): ValueRange = range def getFrom(temporal: TemporalAccessor): Long = { if (!temporal.isSupported(this)) throw unsupportedEx(QY) @@ -349,13 +349,13 @@ object IsoFields { new UnsupportedTemporalTypeException(s"Unsupported field: $f") lazy val WEEK_BASED_YEAR: Field = new Field("WEEK_BASED_YEAR", 3) { - override def toString: String = WBY - def getBaseUnit: TemporalUnit = WEEK_BASED_YEARS - def getRangeUnit: TemporalUnit = FOREVER - def range: ValueRange = YEAR.range - def isSupportedBy(temporal: TemporalAccessor): Boolean = + override def toString: String = WBY + def getBaseUnit: TemporalUnit = WEEK_BASED_YEARS + def getRangeUnit: TemporalUnit = FOREVER + def range: ValueRange = YEAR.range + def isSupportedBy(temporal: TemporalAccessor): Boolean = temporal.isSupported(EPOCH_DAY) && isIso(temporal) - def rangeRefinedBy(temporal: TemporalAccessor): ValueRange = YEAR.range + def rangeRefinedBy(temporal: TemporalAccessor): ValueRange = YEAR.range def getFrom(temporal: TemporalAccessor): Long = if (!temporal.isSupported(this)) throw unsupportedEx(WBY) diff --git a/core/shared/src/main/scala-2/org/threeten/bp/zone/ZoneMap.scala b/core/shared/src/main/scala-2/org/threeten/bp/zone/ZoneMap.scala index f4c6aa966..5e5a4267a 100644 --- a/core/shared/src/main/scala-2/org/threeten/bp/zone/ZoneMap.scala +++ b/core/shared/src/main/scala-2/org/threeten/bp/zone/ZoneMap.scala @@ -12,7 +12,7 @@ import scala.collection.immutable // TreeMap is not available in Scala.js however it is needed for Time Zone support // This is a simple implementation of NavigableMap, performance is likely terrible private[bp] class ZoneMap[K: ClassTag, V] private[bp] (var map: immutable.TreeMap[K, V])(implicit - ordering: Ordering[K] + ordering: Ordering[K] ) extends AbstractMap[K, V] with java.util.NavigableMap[K, V] { def this()(implicit ordering: Ordering[K]) = @@ -164,6 +164,6 @@ private[bp] class ZoneMap[K: ClassTag, V] private[bp] (var map: immutable.TreeMa object ZoneMap { def apply[K: ClassTag, V](map: immutable.TreeMap[K, V])(implicit - ordering: Ordering[K] + ordering: Ordering[K] ): java.util.NavigableMap[K, V] = new ZoneMap[K, V](map) } diff --git a/core/shared/src/main/scala-2/org/threeten/bp/zone/ZoneOffsetTransitionRule.scala b/core/shared/src/main/scala-2/org/threeten/bp/zone/ZoneOffsetTransitionRule.scala index c0d2defaf..6bbf04e0c 100644 --- a/core/shared/src/main/scala-2/org/threeten/bp/zone/ZoneOffsetTransitionRule.scala +++ b/core/shared/src/main/scala-2/org/threeten/bp/zone/ZoneOffsetTransitionRule.scala @@ -68,7 +68,7 @@ object ZoneOffsetTransitionRule { * @param dayOfMonthIndicator * the day of the month-day of the cutover week, positive if the week is that day or later, * negative if the week is that day or earlier, counting from the last day of the month, from - * -28 to 31 excluding 0 + * -28 to 31 excluding 0 * @param dayOfWeek * the required day-of-week, null if the month-day should not be changed * @param time diff --git a/core/shared/src/main/scala-3/org/threeten/bp/DayOfWeek.scala b/core/shared/src/main/scala-3/org/threeten/bp/DayOfWeek.scala index 2c4cc0f56..ab436441e 100644 --- a/core/shared/src/main/scala-3/org/threeten/bp/DayOfWeek.scala +++ b/core/shared/src/main/scala-3/org/threeten/bp/DayOfWeek.scala @@ -112,7 +112,7 @@ object DayOfWeek { * @return * the day-of-week, not null * @throws DateTimeException - * if unable to convert to a { @code DayOfWeek} + * if unable to convert to a {@code DayOfWeek} */ def from(temporal: TemporalAccessor): DayOfWeek = { temporal match { @@ -279,7 +279,7 @@ enum DayOfWeek(name: String, ordinal: Int) * @throws DateTimeException * if a value for the field cannot be obtained * @throws DateTimeException - * if the range of valid values for the field exceeds an { @code int} + * if the range of valid values for the field exceeds an {@code int} * @throws DateTimeException * if the value is outside the range of valid values for the field * @throws ArithmeticException diff --git a/core/shared/src/main/scala-3/org/threeten/bp/Month.scala b/core/shared/src/main/scala-3/org/threeten/bp/Month.scala index c46abd64f..1a922263a 100644 --- a/core/shared/src/main/scala-3/org/threeten/bp/Month.scala +++ b/core/shared/src/main/scala-3/org/threeten/bp/Month.scala @@ -114,7 +114,7 @@ object Month { * @return * the month-of-year, not null * @throws DateTimeException - * if unable to convert to a { @code Month} + * if unable to convert to a {@code Month} */ def from(temporal: TemporalAccessor): Month = { var _temporal = temporal @@ -320,7 +320,7 @@ enum Month private (name: String, ordinal: Int) * @throws DateTimeException * if a value for the field cannot be obtained * @throws DateTimeException - * if the range of valid values for the field exceeds an { @code int} + * if the range of valid values for the field exceeds an {@code int} * @throws DateTimeException * if the value is outside the range of valid values for the field * @throws ArithmeticException diff --git a/core/shared/src/main/scala-3/org/threeten/bp/format/internal/TTBPDateTimeFormatterBuilder.scala b/core/shared/src/main/scala-3/org/threeten/bp/format/internal/TTBPDateTimeFormatterBuilder.scala index 876addf5e..1f917965d 100644 --- a/core/shared/src/main/scala-3/org/threeten/bp/format/internal/TTBPDateTimeFormatterBuilder.scala +++ b/core/shared/src/main/scala-3/org/threeten/bp/format/internal/TTBPDateTimeFormatterBuilder.scala @@ -279,8 +279,8 @@ object TTBPDateTimeFormatterBuilder { * @param signStyle * the positive/negative sign style, not null * @param subsequentWidth - * the width of subsequent non-negative numbers, 0 or greater, - * -1 if fixed width due to active adjacent parsing + * the width of subsequent non-negative numbers, 0 or greater, -1 if fixed width due to active + * adjacent parsing */ private[format] class NumberPrinterParser private[format] ( private[format] val field: TemporalField, diff --git a/core/shared/src/main/scala-3/org/threeten/bp/zone/ZoneOffsetTransitionRule.scala b/core/shared/src/main/scala-3/org/threeten/bp/zone/ZoneOffsetTransitionRule.scala index b10b69a5b..c0f122e10 100644 --- a/core/shared/src/main/scala-3/org/threeten/bp/zone/ZoneOffsetTransitionRule.scala +++ b/core/shared/src/main/scala-3/org/threeten/bp/zone/ZoneOffsetTransitionRule.scala @@ -68,7 +68,7 @@ object ZoneOffsetTransitionRule { * @param dayOfMonthIndicator * the day of the month-day of the cutover week, positive if the week is that day or later, * negative if the week is that day or earlier, counting from the last day of the month, from - * -28 to 31 excluding 0 + * -28 to 31 excluding 0 * @param dayOfWeek * the required day-of-week, null if the month-day should not be changed * @param time diff --git a/core/shared/src/main/scala/org/threeten/bp/Clock.scala b/core/shared/src/main/scala/org/threeten/bp/Clock.scala index ab2228149..4899b7a58 100644 --- a/core/shared/src/main/scala/org/threeten/bp/Clock.scala +++ b/core/shared/src/main/scala/org/threeten/bp/Clock.scala @@ -184,7 +184,9 @@ object Clock { if (tickDuration.isNegative) throw new IllegalArgumentException("Tick duration must not be negative") val tickNanos: Long = tickDuration.toNanos - if (tickNanos % 1000000 == 0) {} else if (1000000000 % tickNanos == 0) {} else + if (tickNanos % 1000000 == 0) {} + else if (1000000000 % tickNanos == 0) {} + else throw new IllegalArgumentException("Invalid tick duration") if (tickNanos <= 1) return baseClock diff --git a/core/shared/src/main/scala/org/threeten/bp/Duration.scala b/core/shared/src/main/scala/org/threeten/bp/Duration.scala index fc7eda6ad..e6dcb6d8f 100644 --- a/core/shared/src/main/scala/org/threeten/bp/Duration.scala +++ b/core/shared/src/main/scala/org/threeten/bp/Duration.scala @@ -87,9 +87,9 @@ object Duration { * @param days * the number of days, positive or negative * @return - * a { @code Duration}, not null + * a {@code Duration}, not null * @throws ArithmeticException - * if the input days exceeds the capacity of { @code Duration} + * if the input days exceeds the capacity of {@code Duration} */ def ofDays(days: Long): Duration = create(Math.multiplyExact(days, 86400L), 0) @@ -102,9 +102,9 @@ object Duration { * @param hours * the number of hours, positive or negative * @return - * a { @code Duration}, not null + * a {@code Duration}, not null * @throws ArithmeticException - * if the input hours exceeds the capacity of { @code Duration} + * if the input hours exceeds the capacity of {@code Duration} */ def ofHours(hours: Long): Duration = create(Math.multiplyExact(hours, 3600L), 0) @@ -117,9 +117,9 @@ object Duration { * @param minutes * the number of minutes, positive or negative * @return - * a { @code Duration}, not null + * a {@code Duration}, not null * @throws ArithmeticException - * if the input minutes exceeds the capacity of { @code Duration} + * if the input minutes exceeds the capacity of {@code Duration} */ def ofMinutes(minutes: Long): Duration = create(Math.multiplyExact(minutes, 60L), 0) @@ -131,7 +131,7 @@ object Duration { * @param seconds * the number of seconds, positive or negative * @return - * a { @code Duration}, not null + * a {@code Duration}, not null */ def ofSeconds(seconds: Long): Duration = create(seconds, 0) @@ -150,9 +150,9 @@ object Duration { * @param nanoAdjustment * the nanosecond adjustment to the number of seconds, positive or negative * @return - * a { @code Duration}, not null + * a {@code Duration}, not null * @throws ArithmeticException - * if the adjustment causes the seconds to exceed the capacity of { @code Duration} + * if the adjustment causes the seconds to exceed the capacity of {@code Duration} */ def ofSeconds(seconds: Long, nanoAdjustment: Long): Duration = { val secs: Long = Math.addExact(seconds, Math.floorDiv(nanoAdjustment, NANOS_PER_SECOND.toLong)) @@ -168,7 +168,7 @@ object Duration { * @param millis * the number of milliseconds, positive or negative * @return - * a { @code Duration}, not null + * a {@code Duration}, not null */ def ofMillis(millis: Long): Duration = { var secs: Long = millis / 1000 @@ -188,7 +188,7 @@ object Duration { * @param nanos * the number of nanoseconds, positive or negative * @return - * a { @code Duration}, not null + * a {@code Duration}, not null */ def ofNanos(nanos: Long): Duration = { var secs: Long = nanos / NANOS_PER_SECOND @@ -214,7 +214,7 @@ object Duration { * @param unit * the unit that the duration is measured in, must have an exact duration, not null * @return - * a { @code Duration}, not null + * a {@code Duration}, not null * @throws DateTimeException * if the period unit has an estimated duration * @throws ArithmeticException @@ -236,7 +236,7 @@ object Duration { * @param amount * the amount to convert, not null * @return - * a { @code Duration}, not null + * a {@code Duration}, not null * @throws DateTimeException * if the amount cannot be converted * @throws ArithmeticException @@ -269,11 +269,11 @@ object Duration { * @param endExclusive * the end instant, exclusive, not null * @return - * a { @code Duration}, not null + * a {@code Duration}, not null * @throws DateTimeException * if the seconds between the temporals cannot be obtained * @throws ArithmeticException - * if the calculation exceeds the capacity of { @code Duration} + * if the calculation exceeds the capacity of {@code Duration} */ def between(startInclusive: Temporal, endExclusive: Temporal): Duration = { var secs: Long = startInclusive.until(endExclusive, SECONDS) @@ -386,7 +386,7 @@ object Duration { 0, ex ) - case ex: ArithmeticException => + case ex: ArithmeticException => throw new DateTimeParseException(s"Text cannot be parsed to a Duration: $errorText", text, 0, @@ -452,7 +452,7 @@ object Duration { * @param seconds * the number of seconds, up to scale 9, positive or negative * @return - * a { @code Duration}, not null + * a {@code Duration}, not null * @throws ArithmeticException * if numeric overflow occurs */ @@ -577,7 +577,7 @@ final class Duration private (private val seconds: Long, private val nanos: Int) * @param seconds * the seconds to represent, may be negative * @return - * a { @code Duration} based on this period with the requested seconds, not null + * a {@code Duration} based on this period with the requested seconds, not null */ def withSeconds(seconds: Long): Duration = Duration.create(seconds, nanos) @@ -592,7 +592,7 @@ final class Duration private (private val seconds: Long, private val nanos: Int) * @param nanoOfSecond * the nano-of-second to represent, from 0 to 999,999,999 * @return - * a { @code Duration} based on this period with the requested nano-of-second, not null + * a {@code Duration} based on this period with the requested nano-of-second, not null * @throws DateTimeException * if the nano-of-second is invalid */ @@ -609,7 +609,7 @@ final class Duration private (private val seconds: Long, private val nanos: Int) * @param duration * the duration to add, positive or negative, not null * @return - * a { @code Duration} based on this duration with the specified duration added, not null + * a {@code Duration} based on this duration with the specified duration added, not null * @throws ArithmeticException * if numeric overflow occurs */ @@ -630,7 +630,7 @@ final class Duration private (private val seconds: Long, private val nanos: Int) * @param unit * the unit that the period is measured in, must have an exact duration, not null * @return - * a { @code Duration} based on this duration with the specified duration added, not null + * a {@code Duration} based on this duration with the specified duration added, not null * @throws ArithmeticException * if numeric overflow occurs */ @@ -667,7 +667,7 @@ final class Duration private (private val seconds: Long, private val nanos: Int) * @param daysToAdd * the days to add, positive or negative * @return - * a { @code Duration} based on this duration with the specified days added, not null + * a {@code Duration} based on this duration with the specified days added, not null * @throws ArithmeticException * if numeric overflow occurs */ @@ -682,7 +682,7 @@ final class Duration private (private val seconds: Long, private val nanos: Int) * @param hoursToAdd * the hours to add, positive or negative * @return - * a { @code Duration} based on this duration with the specified hours added, not null + * a {@code Duration} based on this duration with the specified hours added, not null * @throws ArithmeticException * if numeric overflow occurs */ @@ -697,7 +697,7 @@ final class Duration private (private val seconds: Long, private val nanos: Int) * @param minutesToAdd * the minutes to add, positive or negative * @return - * a { @code Duration} based on this duration with the specified minutes added, not null + * a {@code Duration} based on this duration with the specified minutes added, not null * @throws ArithmeticException * if numeric overflow occurs */ @@ -712,7 +712,7 @@ final class Duration private (private val seconds: Long, private val nanos: Int) * @param secondsToAdd * the seconds to add, positive or negative * @return - * a { @code Duration} based on this duration with the specified seconds added, not null + * a {@code Duration} based on this duration with the specified seconds added, not null * @throws ArithmeticException * if numeric overflow occurs */ @@ -726,7 +726,7 @@ final class Duration private (private val seconds: Long, private val nanos: Int) * @param millisToAdd * the milliseconds to add, positive or negative * @return - * a { @code Duration} based on this duration with the specified milliseconds added, not null + * a {@code Duration} based on this duration with the specified milliseconds added, not null * @throws ArithmeticException * if numeric overflow occurs */ @@ -741,7 +741,7 @@ final class Duration private (private val seconds: Long, private val nanos: Int) * @param nanosToAdd * the nanoseconds to add, positive or negative * @return - * a { @code Duration} based on this duration with the specified nanoseconds added, not null + * a {@code Duration} based on this duration with the specified nanoseconds added, not null * @throws ArithmeticException * if numeric overflow occurs */ @@ -757,7 +757,7 @@ final class Duration private (private val seconds: Long, private val nanos: Int) * @param nanosToAdd * the nanos to add, positive or negative * @return - * a { @code Duration} based on this duration with the specified seconds added, not null + * a {@code Duration} based on this duration with the specified seconds added, not null * @throws ArithmeticException * if numeric overflow occurs */ @@ -780,7 +780,7 @@ final class Duration private (private val seconds: Long, private val nanos: Int) * @param duration * the duration to subtract, positive or negative, not null * @return - * a { @code Duration} based on this duration with the specified duration subtracted, not null + * a {@code Duration} based on this duration with the specified duration subtracted, not null * @throws ArithmeticException * if numeric overflow occurs */ @@ -806,7 +806,7 @@ final class Duration private (private val seconds: Long, private val nanos: Int) * @param unit * the unit that the period is measured in, must have an exact duration, not null * @return - * a { @code Duration} based on this duration with the specified duration subtracted, not null + * a {@code Duration} based on this duration with the specified duration subtracted, not null * @throws ArithmeticException * if numeric overflow occurs */ @@ -822,7 +822,7 @@ final class Duration private (private val seconds: Long, private val nanos: Int) * @param daysToSubtract * the days to subtract, positive or negative * @return - * a { @code Duration} based on this duration with the specified days subtracted, not null + * a {@code Duration} based on this duration with the specified days subtracted, not null * @throws ArithmeticException * if numeric overflow occurs */ @@ -838,7 +838,7 @@ final class Duration private (private val seconds: Long, private val nanos: Int) * @param hoursToSubtract * the hours to subtract, positive or negative * @return - * a { @code Duration} based on this duration with the specified hours subtracted, not null + * a {@code Duration} based on this duration with the specified hours subtracted, not null * @throws ArithmeticException * if numeric overflow occurs */ @@ -854,7 +854,7 @@ final class Duration private (private val seconds: Long, private val nanos: Int) * @param minutesToSubtract * the minutes to subtract, positive or negative * @return - * a { @code Duration} based on this duration with the specified minutes subtracted, not null + * a {@code Duration} based on this duration with the specified minutes subtracted, not null * @throws ArithmeticException * if numeric overflow occurs */ @@ -870,7 +870,7 @@ final class Duration private (private val seconds: Long, private val nanos: Int) * @param secondsToSubtract * the seconds to subtract, positive or negative * @return - * a { @code Duration} based on this duration with the specified seconds subtracted, not null + * a {@code Duration} based on this duration with the specified seconds subtracted, not null * @throws ArithmeticException * if numeric overflow occurs */ @@ -886,7 +886,7 @@ final class Duration private (private val seconds: Long, private val nanos: Int) * @param millisToSubtract * the milliseconds to subtract, positive or negative * @return - * a { @code Duration} based on this duration with the specified milliseconds subtracted, not + * a {@code Duration} based on this duration with the specified milliseconds subtracted, not * null * @throws ArithmeticException * if numeric overflow occurs @@ -903,8 +903,7 @@ final class Duration private (private val seconds: Long, private val nanos: Int) * @param nanosToSubtract * the nanoseconds to subtract, positive or negative * @return - * a { @code Duration} based on this duration with the specified nanoseconds subtracted, not - * null + * a {@code Duration} based on this duration with the specified nanoseconds subtracted, not null * @throws ArithmeticException * if numeric overflow occurs */ @@ -920,7 +919,7 @@ final class Duration private (private val seconds: Long, private val nanos: Int) * @param multiplicand * the value to multiply the duration by, positive or negative * @return - * a { @code Duration} based on this duration multiplied by the specified scalar, not null + * a {@code Duration} based on this duration multiplied by the specified scalar, not null * @throws ArithmeticException * if numeric overflow occurs */ @@ -937,7 +936,7 @@ final class Duration private (private val seconds: Long, private val nanos: Int) * @param divisor * the value to divide the duration by, positive or negative, not zero * @return - * a { @code Duration} based on this duration divided by the specified divisor, not null + * a {@code Duration} based on this duration divided by the specified divisor, not null * @throws ArithmeticException * if the divisor is zero * @throws ArithmeticException @@ -995,7 +994,7 @@ final class Duration private (private val seconds: Long, private val nanos: Int) * This instance is immutable and unaffected by this method call. * * @return - * a { @code Duration} based on this duration with the amount negated, not null + * a {@code Duration} based on this duration with the amount negated, not null * @throws ArithmeticException * if numeric overflow occurs */ @@ -1010,7 +1009,7 @@ final class Duration private (private val seconds: Long, private val nanos: Int) * This instance is immutable and unaffected by this method call. * * @return - * a { @code Duration} based on this duration with an absolute length, not null + * a {@code Duration} based on this duration with an absolute length, not null * @throws ArithmeticException * if numeric overflow occurs */ diff --git a/core/shared/src/main/scala/org/threeten/bp/Instant.scala b/core/shared/src/main/scala/org/threeten/bp/Instant.scala index 800b33d9e..ab30ece68 100644 --- a/core/shared/src/main/scala/org/threeten/bp/Instant.scala +++ b/core/shared/src/main/scala/org/threeten/bp/Instant.scala @@ -208,7 +208,7 @@ object Instant { * @return * the instant, not null * @throws DateTimeException - * if unable to convert to an { @code Instant} + * if unable to convert to an {@code Instant} */ def from(temporal: TemporalAccessor): Instant = try { @@ -527,7 +527,7 @@ final class Instant private (private val seconds: Long, private val nanos: Int) * @param adjuster * the adjuster to use, not null * @return - * an { @code Instant} based on { @code this} with the adjustment made, not null + * an {@code Instant} based on {@code this} with the adjustment made, not null * @throws DateTimeException * if the adjustment cannot be made * @throws ArithmeticException @@ -568,7 +568,7 @@ final class Instant private (private val seconds: Long, private val nanos: Int) * @param newValue * the new value of the field in the result * @return - * an { @code Instant} based on { @code this} with the specified field set, not null + * an {@code Instant} based on {@code this} with the specified field set, not null * @throws DateTimeException * if the field cannot be set * @throws ArithmeticException @@ -614,7 +614,7 @@ final class Instant private (private val seconds: Long, private val nanos: Int) * @param unit * the unit to truncate to, not null * @return - * an { @code Instant} based on this instant with the time truncated, not null + * an {@code Instant} based on this instant with the time truncated, not null * @throws DateTimeException * if the unit is invalid for truncation */ @@ -636,18 +636,18 @@ final class Instant private (private val seconds: Long, private val nanos: Int) /** * {@inheritDoc} * @throws DateTimeException - * { @inheritDoc} + * {@inheritDoc} * @throws ArithmeticException - * { @inheritDoc} + * {@inheritDoc} */ override def plus(amount: TemporalAmount): Instant = amount.addTo(this).asInstanceOf[Instant] /** * {@inheritDoc} * @throws DateTimeException - * { @inheritDoc} + * {@inheritDoc} * @throws ArithmeticException - * { @inheritDoc} + * {@inheritDoc} */ def plus(amountToAdd: Long, unit: TemporalUnit): Instant = { unit match { @@ -686,7 +686,7 @@ final class Instant private (private val seconds: Long, private val nanos: Int) * @param secondsToAdd * the seconds to add, positive or negative * @return - * an { @code Instant} based on this instant with the specified seconds added, not null + * an {@code Instant} based on this instant with the specified seconds added, not null * @throws DateTimeException * if the result exceeds the maximum or minimum instant * @throws ArithmeticException @@ -702,7 +702,7 @@ final class Instant private (private val seconds: Long, private val nanos: Int) * @param millisToAdd * the milliseconds to add, positive or negative * @return - * an { @code Instant} based on this instant with the specified milliseconds added, not null + * an {@code Instant} based on this instant with the specified milliseconds added, not null * @throws DateTimeException * if the result exceeds the maximum or minimum instant * @throws ArithmeticException @@ -719,7 +719,7 @@ final class Instant private (private val seconds: Long, private val nanos: Int) * @param nanosToAdd * the nanoseconds to add, positive or negative * @return - * an { @code Instant} based on this instant with the specified nanoseconds added, not null + * an {@code Instant} based on this instant with the specified nanoseconds added, not null * @throws DateTimeException * if the result exceeds the maximum or minimum instant * @throws ArithmeticException @@ -737,7 +737,7 @@ final class Instant private (private val seconds: Long, private val nanos: Int) * @param nanosToAdd * the nanos to add, positive or negative * @return - * an { @code Instant} based on this instant with the specified seconds added, not null + * an {@code Instant} based on this instant with the specified seconds added, not null * @throws DateTimeException * if the result exceeds the maximum or minimum instant * @throws ArithmeticException @@ -757,9 +757,9 @@ final class Instant private (private val seconds: Long, private val nanos: Int) /** * {@inheritDoc} * @throws DateTimeException - * { @inheritDoc} + * {@inheritDoc} * @throws ArithmeticException - * { @inheritDoc} + * {@inheritDoc} */ override def minus(amount: TemporalAmount): Instant = amount.subtractFrom(this).asInstanceOf[Instant] @@ -767,9 +767,9 @@ final class Instant private (private val seconds: Long, private val nanos: Int) /** * {@inheritDoc} * @throws DateTimeException - * { @inheritDoc} + * {@inheritDoc} * @throws ArithmeticException - * { @inheritDoc} + * {@inheritDoc} */ override def minus(amountToSubtract: Long, unit: TemporalUnit): Instant = if (amountToSubtract == Long.MinValue) plus(Long.MaxValue, unit).plus(1, unit) @@ -783,7 +783,7 @@ final class Instant private (private val seconds: Long, private val nanos: Int) * @param secondsToSubtract * the seconds to subtract, positive or negative * @return - * an { @code Instant} based on this instant with the specified seconds subtracted, not null + * an {@code Instant} based on this instant with the specified seconds subtracted, not null * @throws DateTimeException * if the result exceeds the maximum or minimum instant * @throws ArithmeticException @@ -803,8 +803,7 @@ final class Instant private (private val seconds: Long, private val nanos: Int) * @param millisToSubtract * the milliseconds to subtract, positive or negative * @return - * an { @code Instant} based on this instant with the specified milliseconds subtracted, not - * null + * an {@code Instant} based on this instant with the specified milliseconds subtracted, not null * @throws DateTimeException * if the result exceeds the maximum or minimum instant * @throws ArithmeticException @@ -824,7 +823,7 @@ final class Instant private (private val seconds: Long, private val nanos: Int) * @param nanosToSubtract * the nanoseconds to subtract, positive or negative * @return - * an { @code Instant} based on this instant with the specified nanoseconds subtracted, not null + * an {@code Instant} based on this instant with the specified nanoseconds subtracted, not null * @throws DateTimeException * if the result exceeds the maximum or minimum instant * @throws ArithmeticException @@ -924,7 +923,7 @@ final class Instant private (private val seconds: Long, private val nanos: Int) * This instance is immutable and unaffected by this method call. * * @param endExclusive - * the end date, which is converted to an { @code Instant}, not null + * the end date, which is converted to an {@code Instant}, not null * @param unit * the unit to measure the period in, not null * @return diff --git a/core/shared/src/main/scala/org/threeten/bp/LocalDate.scala b/core/shared/src/main/scala/org/threeten/bp/LocalDate.scala index c27f26473..7effc38a3 100644 --- a/core/shared/src/main/scala/org/threeten/bp/LocalDate.scala +++ b/core/shared/src/main/scala/org/threeten/bp/LocalDate.scala @@ -276,7 +276,7 @@ object LocalDate { * @return * the local date, not null * @throws DateTimeException - * if unable to convert to a { @code LocalDate} + * if unable to convert to a {@code LocalDate} */ def from(temporal: TemporalAccessor): LocalDate = { val date: LocalDate = temporal.query(TemporalQueries.localDate) @@ -594,7 +594,7 @@ final class LocalDate private (private val year: Int, monthOfYear: Int, dayOfMon * IsoChronology} using the {@code ==} operator. * * @return - * the { @code IsoChronology} era constant applicable at this date, not null + * the {@code IsoChronology} era constant applicable at this date, not null */ override def getEra: Era = super.getEra @@ -747,7 +747,7 @@ final class LocalDate private (private val year: Int, monthOfYear: Int, dayOfMon * @param adjuster * the adjuster to use, not null * @return - * a { @code LocalDate} based on { @code this} with the adjustment made, not null + * a {@code LocalDate} based on {@code this} with the adjustment made, not null * @throws DateTimeException * if the adjustment cannot be made * @throws ArithmeticException @@ -830,7 +830,7 @@ final class LocalDate private (private val year: Int, monthOfYear: Int, dayOfMon * @param newValue * the new value of the field in the result * @return - * a { @code LocalDate} based on { @code this} with the specified field set, not null + * a {@code LocalDate} based on {@code this} with the specified field set, not null * @throws DateTimeException * if the field cannot be set * @throws ArithmeticException @@ -870,7 +870,7 @@ final class LocalDate private (private val year: Int, monthOfYear: Int, dayOfMon * @param year * the year to set in the result, from MIN_YEAR to MAX_YEAR * @return - * a { @code LocalDate} based on this date with the requested year, not null + * a {@code LocalDate} based on this date with the requested year, not null * @throws DateTimeException * if the year value is invalid */ @@ -891,7 +891,7 @@ final class LocalDate private (private val year: Int, monthOfYear: Int, dayOfMon * @param month * the month-of-year to set in the result, from 1 (January) to 12 (December) * @return - * a { @code LocalDate} based on this date with the requested month, not null + * a {@code LocalDate} based on this date with the requested month, not null * @throws DateTimeException * if the month-of-year value is invalid */ @@ -912,7 +912,7 @@ final class LocalDate private (private val year: Int, monthOfYear: Int, dayOfMon * @param dayOfMonth * the day-of-month to set in the result, from 1 to 28-31 * @return - * a { @code LocalDate} based on this date with the requested day, not null + * a {@code LocalDate} based on this date with the requested day, not null * @throws DateTimeException * if the day-of-month value is invalid * @throws DateTimeException @@ -931,7 +931,7 @@ final class LocalDate private (private val year: Int, monthOfYear: Int, dayOfMon * @param dayOfYear * the day-of-year to set in the result, from 1 to 365-366 * @return - * a { @code LocalDate} based on this date with the requested day, not null + * a {@code LocalDate} based on this date with the requested day, not null * @throws DateTimeException * if the day-of-year value is invalid * @throws DateTimeException @@ -954,7 +954,7 @@ final class LocalDate private (private val year: Int, monthOfYear: Int, dayOfMon * @param amount * the amount to add, not null * @return - * a { @code LocalDate} based on this date with the addition made, not null + * a {@code LocalDate} based on this date with the addition made, not null * @throws DateTimeException * if the addition cannot be made * @throws ArithmeticException @@ -977,7 +977,7 @@ final class LocalDate private (private val year: Int, monthOfYear: Int, dayOfMon * @param unit * the unit of the period to add, not null * @return - * a { @code LocalDate} based on this date with the specified period added, not null + * a {@code LocalDate} based on this date with the specified period added, not null * @throws DateTimeException * if the unit cannot be added to this type */ @@ -1015,7 +1015,7 @@ final class LocalDate private (private val year: Int, monthOfYear: Int, dayOfMon * @param yearsToAdd * the years to add, may be negative * @return - * a { @code LocalDate} based on this date with the years added, not null + * a {@code LocalDate} based on this date with the years added, not null * @throws DateTimeException * if the result exceeds the supported date range */ @@ -1042,7 +1042,7 @@ final class LocalDate private (private val year: Int, monthOfYear: Int, dayOfMon * @param monthsToAdd * the months to add, may be negative * @return - * a { @code LocalDate} based on this date with the months added, not null + * a {@code LocalDate} based on this date with the months added, not null * @throws DateTimeException * if the result exceeds the supported date range */ @@ -1071,7 +1071,7 @@ final class LocalDate private (private val year: Int, monthOfYear: Int, dayOfMon * @param weeksToAdd * the weeks to add, may be negative * @return - * a { @code LocalDate} based on this date with the weeks added, not null + * a {@code LocalDate} based on this date with the weeks added, not null * @throws DateTimeException * if the result exceeds the supported date range */ @@ -1091,7 +1091,7 @@ final class LocalDate private (private val year: Int, monthOfYear: Int, dayOfMon * @param daysToAdd * the days to add, may be negative * @return - * a { @code LocalDate} based on this date with the days added, not null + * a {@code LocalDate} based on this date with the days added, not null * @throws DateTimeException * if the result exceeds the supported date range */ @@ -1116,7 +1116,7 @@ final class LocalDate private (private val year: Int, monthOfYear: Int, dayOfMon * @param amount * the amount to subtract, not null * @return - * a { @code LocalDate} based on this date with the subtraction made, not null + * a {@code LocalDate} based on this date with the subtraction made, not null * @throws DateTimeException * if the subtraction cannot be made * @throws ArithmeticException @@ -1140,7 +1140,7 @@ final class LocalDate private (private val year: Int, monthOfYear: Int, dayOfMon * @param unit * the unit of the period to subtract, not null * @return - * a { @code LocalDate} based on this date with the specified period subtracted, not null + * a {@code LocalDate} based on this date with the specified period subtracted, not null * @throws DateTimeException * if the unit cannot be added to this type */ @@ -1164,7 +1164,7 @@ final class LocalDate private (private val year: Int, monthOfYear: Int, dayOfMon * @param yearsToSubtract * the years to subtract, may be negative * @return - * a { @code LocalDate} based on this date with the years subtracted, not null + * a {@code LocalDate} based on this date with the years subtracted, not null * @throws DateTimeException * if the result exceeds the supported date range */ @@ -1187,7 +1187,7 @@ final class LocalDate private (private val year: Int, monthOfYear: Int, dayOfMon * @param monthsToSubtract * the months to subtract, may be negative * @return - * a { @code LocalDate} based on this date with the months subtracted, not null + * a {@code LocalDate} based on this date with the months subtracted, not null * @throws DateTimeException * if the result exceeds the supported date range */ @@ -1209,7 +1209,7 @@ final class LocalDate private (private val year: Int, monthOfYear: Int, dayOfMon * @param weeksToSubtract * the weeks to subtract, may be negative * @return - * a { @code LocalDate} based on this date with the weeks subtracted, not null + * a {@code LocalDate} based on this date with the weeks subtracted, not null * @throws DateTimeException * if the result exceeds the supported date range */ @@ -1231,7 +1231,7 @@ final class LocalDate private (private val year: Int, monthOfYear: Int, dayOfMon * @param daysToSubtract * the days to subtract, may be negative * @return - * a { @code LocalDate} based on this date with the days subtracted, not null + * a {@code LocalDate} based on this date with the days subtracted, not null * @throws DateTimeException * if the result exceeds the supported date range */ @@ -1323,7 +1323,7 @@ final class LocalDate private (private val year: Int, monthOfYear: Int, dayOfMon * This instance is immutable and unaffected by this method call. * * @param endExclusive - * the end date, which is converted to a { @code LocalDate}, not null + * the end date, which is converted to a {@code LocalDate}, not null * @param unit * the unit to measure the period in, not null * @return @@ -1598,8 +1598,7 @@ final class LocalDate private (private val year: Int, monthOfYear: Int, dayOfMon * * This checks to see if this date represents a point on the local time-line after the other date. *
 LocalDate a = LocalDate.of(2012, 6, 30); LocalDate b = LocalDate.of(2012, 7, 1);
-   * a.isAfter(b) == false
-   * a.isAfter(a) == false b.isAfter(a) == true 
+ * a.isAfter(b) == false a.isAfter(a) == false b.isAfter(a) == true * * This method only considers the position of the two dates on the local time-line. It does not * take into account the chronology, or calendar system. This is different from the comparison in @@ -1619,8 +1618,7 @@ final class LocalDate private (private val year: Int, monthOfYear: Int, dayOfMon * * This checks to see if this date represents a point on the local time-line before the other * date.
 LocalDate a = LocalDate.of(2012, 6, 30); LocalDate b = LocalDate.of(2012, 7, 1);
-   * a.isBefore(b) == true
-   * a.isBefore(a) == false b.isBefore(a) == false 
+ * a.isBefore(b) == true a.isBefore(a) == false b.isBefore(a) == false * * This method only considers the position of the two dates on the local time-line. It does not * take into account the chronology, or calendar system. This is different from the comparison in @@ -1640,8 +1638,7 @@ final class LocalDate private (private val year: Int, monthOfYear: Int, dayOfMon * * This checks to see if this date represents the same point on the local time-line as the other * date.
 LocalDate a = LocalDate.of(2012, 6, 30); LocalDate b = LocalDate.of(2012, 7, 1);
-   * a.isEqual(b) == false
-   * a.isEqual(a) == true b.isEqual(a) == false 
+ * a.isEqual(b) == false a.isEqual(a) == true b.isEqual(a) == false * * This method only considers the position of the two dates on the local time-line. It does not * take into account the chronology, or calendar system. This is different from the comparison in diff --git a/core/shared/src/main/scala/org/threeten/bp/LocalDateTime.scala b/core/shared/src/main/scala/org/threeten/bp/LocalDateTime.scala index 8dfff04e3..3d3e1cbd9 100644 --- a/core/shared/src/main/scala/org/threeten/bp/LocalDateTime.scala +++ b/core/shared/src/main/scala/org/threeten/bp/LocalDateTime.scala @@ -432,7 +432,7 @@ object LocalDateTime { * @return * the local date-time, not null * @throws DateTimeException - * if unable to convert to a { @code LocalDateTime} + * if unable to convert to a {@code LocalDateTime} */ def from(temporal: TemporalAccessor): LocalDateTime = temporal match { @@ -823,7 +823,7 @@ final class LocalDateTime private (private val date: LocalDate, private val time * @param adjuster * the adjuster to use, not null * @return - * a { @code LocalDateTime} based on { @code this} with the adjustment made, not null + * a {@code LocalDateTime} based on {@code this} with the adjustment made, not null * @throws DateTimeException * if the adjustment cannot be made * @throws ArithmeticException @@ -867,7 +867,7 @@ final class LocalDateTime private (private val date: LocalDate, private val time * @param newValue * the new value of the field in the result * @return - * a { @code LocalDateTime} based on { @code this} with the specified field set, not null + * a {@code LocalDateTime} based on {@code this} with the specified field set, not null * @throws DateTimeException * if the field cannot be set * @throws ArithmeticException @@ -891,7 +891,7 @@ final class LocalDateTime private (private val date: LocalDate, private val time * @param year * the year to set in the result, from MIN_YEAR to MAX_YEAR * @return - * a { @code LocalDateTime} based on this date-time with the requested year, not null + * a {@code LocalDateTime} based on this date-time with the requested year, not null * @throws DateTimeException * if the year value is invalid */ @@ -907,7 +907,7 @@ final class LocalDateTime private (private val date: LocalDate, private val time * @param month * the month-of-year to set in the result, from 1 (January) to 12 (December) * @return - * a { @code LocalDateTime} based on this date-time with the requested month, not null + * a {@code LocalDateTime} based on this date-time with the requested month, not null * @throws DateTimeException * if the month-of-year value is invalid */ @@ -923,7 +923,7 @@ final class LocalDateTime private (private val date: LocalDate, private val time * @param dayOfMonth * the day-of-month to set in the result, from 1 to 28-31 * @return - * a { @code LocalDateTime} based on this date-time with the requested day, not null + * a {@code LocalDateTime} based on this date-time with the requested day, not null * @throws DateTimeException * if the day-of-month value is invalid * @throws DateTimeException @@ -940,7 +940,7 @@ final class LocalDateTime private (private val date: LocalDate, private val time * @param dayOfYear * the day-of-year to set in the result, from 1 to 365-366 * @return - * a { @code LocalDateTime} based on this date with the requested day, not null + * a {@code LocalDateTime} based on this date with the requested day, not null * @throws DateTimeException * if the day-of-year value is invalid * @throws DateTimeException @@ -956,7 +956,7 @@ final class LocalDateTime private (private val date: LocalDate, private val time * @param hour * the hour-of-day to set in the result, from 0 to 23 * @return - * a { @code LocalDateTime} based on this date-time with the requested hour, not null + * a {@code LocalDateTime} based on this date-time with the requested hour, not null * @throws DateTimeException * if the hour value is invalid */ @@ -971,7 +971,7 @@ final class LocalDateTime private (private val date: LocalDate, private val time * @param minute * the minute-of-hour to set in the result, from 0 to 59 * @return - * a { @code LocalDateTime} based on this date-time with the requested minute, not null + * a {@code LocalDateTime} based on this date-time with the requested minute, not null * @throws DateTimeException * if the minute value is invalid */ @@ -988,7 +988,7 @@ final class LocalDateTime private (private val date: LocalDate, private val time * @param second * the second-of-minute to set in the result, from 0 to 59 * @return - * a { @code LocalDateTime} based on this date-time with the requested second, not null + * a {@code LocalDateTime} based on this date-time with the requested second, not null * @throws DateTimeException * if the second value is invalid */ @@ -1005,7 +1005,7 @@ final class LocalDateTime private (private val date: LocalDate, private val time * @param nanoOfSecond * the nano-of-second to set in the result, from 0 to 999,999,999 * @return - * a { @code LocalDateTime} based on this date-time with the requested nanosecond, not null + * a {@code LocalDateTime} based on this date-time with the requested nanosecond, not null * @throws DateTimeException * if the nano value is invalid */ @@ -1030,7 +1030,7 @@ final class LocalDateTime private (private val date: LocalDate, private val time * @param unit * the unit to truncate to, not null * @return - * a { @code LocalDateTime} based on this date-time with the time truncated, not null + * a {@code LocalDateTime} based on this date-time with the time truncated, not null * @throws DateTimeException * if unable to truncate */ @@ -1049,7 +1049,7 @@ final class LocalDateTime private (private val date: LocalDate, private val time * @param amount * the amount to add, not null * @return - * a { @code LocalDateTime} based on this date-time with the addition made, not null + * a {@code LocalDateTime} based on this date-time with the addition made, not null * @throws DateTimeException * if the addition cannot be made * @throws ArithmeticException @@ -1073,7 +1073,7 @@ final class LocalDateTime private (private val date: LocalDate, private val time * @param unit * the unit of the period to add, not null * @return - * a { @code LocalDateTime} based on this date-time with the specified period added, not null + * a {@code LocalDateTime} based on this date-time with the specified period added, not null * @throws DateTimeException * if the unit cannot be added to this type */ @@ -1114,7 +1114,7 @@ final class LocalDateTime private (private val date: LocalDate, private val time * @param years * the years to add, may be negative * @return - * a { @code LocalDateTime} based on this date-time with the years added, not null + * a {@code LocalDateTime} based on this date-time with the years added, not null * @throws DateTimeException * if the result exceeds the supported date range */ @@ -1138,7 +1138,7 @@ final class LocalDateTime private (private val date: LocalDate, private val time * @param months * the months to add, may be negative * @return - * a { @code LocalDateTime} based on this date-time with the months added, not null + * a {@code LocalDateTime} based on this date-time with the months added, not null * @throws DateTimeException * if the result exceeds the supported date range */ @@ -1161,7 +1161,7 @@ final class LocalDateTime private (private val date: LocalDate, private val time * @param weeks * the weeks to add, may be negative * @return - * a { @code LocalDateTime} based on this date-time with the weeks added, not null + * a {@code LocalDateTime} based on this date-time with the weeks added, not null * @throws DateTimeException * if the result exceeds the supported date range */ @@ -1184,7 +1184,7 @@ final class LocalDateTime private (private val date: LocalDate, private val time * @param days * the days to add, may be negative * @return - * a { @code LocalDateTime} based on this date-time with the days added, not null + * a {@code LocalDateTime} based on this date-time with the days added, not null * @throws DateTimeException * if the result exceeds the supported date range */ @@ -1201,7 +1201,7 @@ final class LocalDateTime private (private val date: LocalDate, private val time * @param hours * the hours to add, may be negative * @return - * a { @code LocalDateTime} based on this date-time with the hours added, not null + * a {@code LocalDateTime} based on this date-time with the hours added, not null * @throws DateTimeException * if the result exceeds the supported date range */ @@ -1215,7 +1215,7 @@ final class LocalDateTime private (private val date: LocalDate, private val time * @param minutes * the minutes to add, may be negative * @return - * a { @code LocalDateTime} based on this date-time with the minutes added, not null + * a {@code LocalDateTime} based on this date-time with the minutes added, not null * @throws DateTimeException * if the result exceeds the supported date range */ @@ -1229,7 +1229,7 @@ final class LocalDateTime private (private val date: LocalDate, private val time * @param seconds * the seconds to add, may be negative * @return - * a { @code LocalDateTime} based on this date-time with the seconds added, not null + * a {@code LocalDateTime} based on this date-time with the seconds added, not null * @throws DateTimeException * if the result exceeds the supported date range */ @@ -1243,7 +1243,7 @@ final class LocalDateTime private (private val date: LocalDate, private val time * @param nanos * the nanos to add, may be negative * @return - * a { @code LocalDateTime} based on this date-time with the nanoseconds added, not null + * a {@code LocalDateTime} based on this date-time with the nanoseconds added, not null * @throws DateTimeException * if the result exceeds the supported date range */ @@ -1262,7 +1262,7 @@ final class LocalDateTime private (private val date: LocalDate, private val time * @param amount * the amount to subtract, not null * @return - * a { @code LocalDateTime} based on this date-time with the subtraction made, not null + * a {@code LocalDateTime} based on this date-time with the subtraction made, not null * @throws DateTimeException * if the subtraction cannot be made * @throws ArithmeticException @@ -1286,7 +1286,7 @@ final class LocalDateTime private (private val date: LocalDate, private val time * @param unit * the unit of the period to subtract, not null * @return - * a { @code LocalDateTime} based on this date-time with the specified period subtracted, not + * a {@code LocalDateTime} based on this date-time with the specified period subtracted, not * null * @throws DateTimeException * if the unit cannot be added to this type @@ -1311,7 +1311,7 @@ final class LocalDateTime private (private val date: LocalDate, private val time * @param years * the years to subtract, may be negative * @return - * a { @code LocalDateTime} based on this date-time with the years subtracted, not null + * a {@code LocalDateTime} based on this date-time with the years subtracted, not null * @throws DateTimeException * if the result exceeds the supported date range */ @@ -1334,7 +1334,7 @@ final class LocalDateTime private (private val date: LocalDate, private val time * @param months * the months to subtract, may be negative * @return - * a { @code LocalDateTime} based on this date-time with the months subtracted, not null + * a {@code LocalDateTime} based on this date-time with the months subtracted, not null * @throws DateTimeException * if the result exceeds the supported date range */ @@ -1356,7 +1356,7 @@ final class LocalDateTime private (private val date: LocalDate, private val time * @param weeks * the weeks to subtract, may be negative * @return - * a { @code LocalDateTime} based on this date-time with the weeks subtracted, not null + * a {@code LocalDateTime} based on this date-time with the weeks subtracted, not null * @throws DateTimeException * if the result exceeds the supported date range */ @@ -1378,7 +1378,7 @@ final class LocalDateTime private (private val date: LocalDate, private val time * @param days * the days to subtract, may be negative * @return - * a { @code LocalDateTime} based on this date-time with the days subtracted, not null + * a {@code LocalDateTime} based on this date-time with the days subtracted, not null * @throws DateTimeException * if the result exceeds the supported date range */ @@ -1394,7 +1394,7 @@ final class LocalDateTime private (private val date: LocalDate, private val time * @param hours * the hours to subtract, may be negative * @return - * a { @code LocalDateTime} based on this date-time with the hours subtracted, not null + * a {@code LocalDateTime} based on this date-time with the hours subtracted, not null * @throws DateTimeException * if the result exceeds the supported date range */ @@ -1408,7 +1408,7 @@ final class LocalDateTime private (private val date: LocalDate, private val time * @param minutes * the minutes to subtract, may be negative * @return - * a { @code LocalDateTime} based on this date-time with the minutes subtracted, not null + * a {@code LocalDateTime} based on this date-time with the minutes subtracted, not null * @throws DateTimeException * if the result exceeds the supported date range */ @@ -1422,7 +1422,7 @@ final class LocalDateTime private (private val date: LocalDate, private val time * @param seconds * the seconds to subtract, may be negative * @return - * a { @code LocalDateTime} based on this date-time with the seconds subtracted, not null + * a {@code LocalDateTime} based on this date-time with the seconds subtracted, not null * @throws DateTimeException * if the result exceeds the supported date range */ @@ -1437,7 +1437,7 @@ final class LocalDateTime private (private val date: LocalDate, private val time * @param nanos * the nanos to subtract, may be negative * @return - * a { @code LocalDateTime} based on this date-time with the nanoseconds subtracted, not null + * a {@code LocalDateTime} based on this date-time with the nanoseconds subtracted, not null * @throws DateTimeException * if the result exceeds the supported date range */ @@ -1572,7 +1572,7 @@ final class LocalDateTime private (private val date: LocalDate, private val time * This instance is immutable and unaffected by this method call. * * @param endExclusive - * the end date-time, which is converted to a { @code LocalDateTime}, not null + * the end date-time, which is converted to a {@code LocalDateTime}, not null * @param unit * the unit to measure the period in, not null * @return @@ -1739,9 +1739,8 @@ final class LocalDateTime private (private val date: LocalDate, private val time * * This checks to see if this date-time represents a point on the local time-line after the other * date-time.
 LocalDate a = LocalDateTime.of(2012, 6, 30, 12, 00); LocalDate b =
-   * LocalDateTime.of(2012, 7, 1, 12, 00);
-   * a.isAfter(b) == false
-   * a.isAfter(a) == false b.isAfter(a) == true 
+ * LocalDateTime.of(2012, 7, 1, 12, 00); a.isAfter(b) == false a.isAfter(a) == false b.isAfter(a) == + * true * * This method only considers the position of the two date-times on the local time-line. It does * not take into account the chronology, or calendar system. This is different from the comparison @@ -1764,9 +1763,8 @@ final class LocalDateTime private (private val date: LocalDate, private val time * * This checks to see if this date-time represents a point on the local time-line before the other * date-time.
 LocalDate a = LocalDateTime.of(2012, 6, 30, 12, 00); LocalDate b =
-   * LocalDateTime.of(2012, 7, 1, 12, 00);
-   * a.isBefore(b) == true
-   * a.isBefore(a) == false b.isBefore(a) == false 
+ * LocalDateTime.of(2012, 7, 1, 12, 00); a.isBefore(b) == true a.isBefore(a) == false + * b.isBefore(a) == false * * This method only considers the position of the two date-times on the local time-line. It does * not take into account the chronology, or calendar system. This is different from the comparison @@ -1789,9 +1787,8 @@ final class LocalDateTime private (private val date: LocalDate, private val time * * This checks to see if this date-time represents the same point on the local time-line as the * other date-time.
 LocalDate a = LocalDateTime.of(2012, 6, 30, 12, 00); LocalDate b =
-   * LocalDateTime.of(2012, 7, 1, 12, 00);
-   * a.isEqual(b) == false
-   * a.isEqual(a) == true b.isEqual(a) == false 
+ * LocalDateTime.of(2012, 7, 1, 12, 00); a.isEqual(b) == false a.isEqual(a) == true b.isEqual(a) == + * false * * This method only considers the position of the two date-times on the local time-line. It does * not take into account the chronology, or calendar system. This is different from the comparison diff --git a/core/shared/src/main/scala/org/threeten/bp/LocalTime.scala b/core/shared/src/main/scala/org/threeten/bp/LocalTime.scala index 987ddb29d..0e30795c9 100644 --- a/core/shared/src/main/scala/org/threeten/bp/LocalTime.scala +++ b/core/shared/src/main/scala/org/threeten/bp/LocalTime.scala @@ -260,7 +260,7 @@ object LocalTime { * This factory may return a cached value, but applications must not rely on this. * * @param secondOfDay - * the second-of-day, from { @code 0} to { @code 24 * 60 * 60 - 1} + * the second-of-day, from {@code 0} to {@code 24 * 60 * 60 - 1} * @return * the local time, not null * @throws DateTimeException @@ -283,7 +283,7 @@ object LocalTime { * This factory may return a cached value, but applications must not rely on this. * * @param secondOfDay - * the second-of-day, from { @code 0} to { @code 24 * 60 * 60 - 1} + * the second-of-day, from {@code 0} to {@code 24 * 60 * 60 - 1} * @param nanoOfSecond * the nano-of-second, from 0 to 999,999,999 * @return @@ -308,7 +308,7 @@ object LocalTime { * This factory may return a cached value, but applications must not rely on this. * * @param nanoOfDay - * the nano of day, from { @code 0} to { @code 24 * 60 * 60 * 1,000,000,000 - 1} + * the nano of day, from {@code 0} to {@code 24 * 60 * 60 * 1,000,000,000 - 1} * @return * the local time, not null * @throws DateTimeException @@ -343,7 +343,7 @@ object LocalTime { * @return * the local time, not null * @throws DateTimeException - * if unable to convert to a { @code LocalTime} + * if unable to convert to a {@code LocalTime} */ def from(temporal: TemporalAccessor): LocalTime = { val time: LocalTime = temporal.query(TemporalQueries.localTime) @@ -653,7 +653,7 @@ final class LocalTime(_hour: Int, _minute: Int, _second: Int, private val nano: * @param adjuster * the adjuster to use, not null * @return - * a { @code LocalTime} based on { @code this} with the adjustment made, not null + * a {@code LocalTime} based on {@code this} with the adjustment made, not null * @throws DateTimeException * if the adjustment cannot be made * @throws ArithmeticException @@ -722,7 +722,7 @@ final class LocalTime(_hour: Int, _minute: Int, _second: Int, private val nano: * @param newValue * the new value of the field in the result * @return - * a { @code LocalTime} based on { @code this} with the specified field set, not null + * a {@code LocalTime} based on {@code this} with the specified field set, not null * @throws DateTimeException * if the field cannot be set * @throws ArithmeticException @@ -763,7 +763,7 @@ final class LocalTime(_hour: Int, _minute: Int, _second: Int, private val nano: * @param hour * the hour-of-day to set in the result, from 0 to 23 * @return - * a { @code LocalTime} based on this time with the requested hour, not null + * a {@code LocalTime} based on this time with the requested hour, not null * @throws DateTimeException * if the hour value is invalid */ @@ -783,7 +783,7 @@ final class LocalTime(_hour: Int, _minute: Int, _second: Int, private val nano: * @param minute * the minute-of-hour to set in the result, from 0 to 59 * @return - * a { @code LocalTime} based on this time with the requested minute, not null + * a {@code LocalTime} based on this time with the requested minute, not null * @throws DateTimeException * if the minute value is invalid */ @@ -803,7 +803,7 @@ final class LocalTime(_hour: Int, _minute: Int, _second: Int, private val nano: * @param second * the second-of-minute to set in the result, from 0 to 59 * @return - * a { @code LocalTime} based on this time with the requested second, not null + * a {@code LocalTime} based on this time with the requested second, not null * @throws DateTimeException * if the second value is invalid */ @@ -823,7 +823,7 @@ final class LocalTime(_hour: Int, _minute: Int, _second: Int, private val nano: * @param nanoOfSecond * the nano-of-second to set in the result, from 0 to 999,999,999 * @return - * a { @code LocalTime} based on this time with the requested nanosecond, not null + * a {@code LocalTime} based on this time with the requested nanosecond, not null * @throws DateTimeException * if the nanos value is invalid */ @@ -851,7 +851,7 @@ final class LocalTime(_hour: Int, _minute: Int, _second: Int, private val nano: * @param unit * the unit to truncate to, not null * @return - * a { @code LocalTime} based on this time with the time truncated, not null + * a {@code LocalTime} based on this time with the time truncated, not null * @throws DateTimeException * if unable to truncate */ @@ -881,7 +881,7 @@ final class LocalTime(_hour: Int, _minute: Int, _second: Int, private val nano: * @param amount * the amount to add, not null * @return - * a { @code LocalTime} based on this time with the addition made, not null + * a {@code LocalTime} based on this time with the addition made, not null * @throws DateTimeException * if the addition cannot be made * @throws ArithmeticException @@ -904,7 +904,7 @@ final class LocalTime(_hour: Int, _minute: Int, _second: Int, private val nano: * @param unit * the unit of the period to add, not null * @return - * a { @code LocalTime} based on this time with the specified period added, not null + * a {@code LocalTime} based on this time with the specified period added, not null * @throws DateTimeException * if the unit cannot be added to this type */ @@ -937,7 +937,7 @@ final class LocalTime(_hour: Int, _minute: Int, _second: Int, private val nano: * @param hoursToAdd * the hours to add, may be negative * @return - * a { @code LocalTime} based on this time with the hours added, not null + * a {@code LocalTime} based on this time with the hours added, not null */ def plusHours(hoursToAdd: Long): LocalTime = { if (hoursToAdd == 0) @@ -958,7 +958,7 @@ final class LocalTime(_hour: Int, _minute: Int, _second: Int, private val nano: * @param minutesToAdd * the minutes to add, may be negative * @return - * a { @code LocalTime} based on this time with the minutes added, not null + * a {@code LocalTime} based on this time with the minutes added, not null */ def plusMinutes(minutesToAdd: Long): LocalTime = { if (minutesToAdd == 0) @@ -984,7 +984,7 @@ final class LocalTime(_hour: Int, _minute: Int, _second: Int, private val nano: * @param secondstoAdd * the seconds to add, may be negative * @return - * a { @code LocalTime} based on this time with the seconds added, not null + * a {@code LocalTime} based on this time with the seconds added, not null */ def plusSeconds(secondstoAdd: Long): LocalTime = { if (secondstoAdd == 0) @@ -1012,7 +1012,7 @@ final class LocalTime(_hour: Int, _minute: Int, _second: Int, private val nano: * @param nanosToAdd * the nanos to add, may be negative * @return - * a { @code LocalTime} based on this time with the nanoseconds added, not null + * a {@code LocalTime} based on this time with the nanoseconds added, not null */ def plusNanos(nanosToAdd: Long): LocalTime = { if (nanosToAdd == 0) @@ -1043,7 +1043,7 @@ final class LocalTime(_hour: Int, _minute: Int, _second: Int, private val nano: * @param amount * the amount to subtract, not null * @return - * a { @code LocalTime} based on this time with the subtraction made, not null + * a {@code LocalTime} based on this time with the subtraction made, not null * @throws DateTimeException * if the subtraction cannot be made * @throws ArithmeticException @@ -1067,7 +1067,7 @@ final class LocalTime(_hour: Int, _minute: Int, _second: Int, private val nano: * @param unit * the unit of the period to subtract, not null * @return - * a { @code LocalTime} based on this time with the specified period subtracted, not null + * a {@code LocalTime} based on this time with the specified period subtracted, not null * @throws DateTimeException * if the unit cannot be added to this type */ @@ -1086,7 +1086,7 @@ final class LocalTime(_hour: Int, _minute: Int, _second: Int, private val nano: * @param hoursToSubtract * the hours to subtract, may be negative * @return - * a { @code LocalTime} based on this time with the hours subtracted, not null + * a {@code LocalTime} based on this time with the hours subtracted, not null */ def minusHours(hoursToSubtract: Long): LocalTime = plusHours(-(hoursToSubtract % LocalTime.HOURS_PER_DAY)) @@ -1102,7 +1102,7 @@ final class LocalTime(_hour: Int, _minute: Int, _second: Int, private val nano: * @param minutesToSubtract * the minutes to subtract, may be negative * @return - * a { @code LocalTime} based on this time with the minutes subtracted, not null + * a {@code LocalTime} based on this time with the minutes subtracted, not null */ def minusMinutes(minutesToSubtract: Long): LocalTime = plusMinutes(-(minutesToSubtract % LocalTime.MINUTES_PER_DAY)) @@ -1118,7 +1118,7 @@ final class LocalTime(_hour: Int, _minute: Int, _second: Int, private val nano: * @param secondsToSubtract * the seconds to subtract, may be negative * @return - * a { @code LocalTime} based on this time with the seconds subtracted, not null + * a {@code LocalTime} based on this time with the seconds subtracted, not null */ def minusSeconds(secondsToSubtract: Long): LocalTime = plusSeconds(-(secondsToSubtract % LocalTime.SECONDS_PER_DAY)) @@ -1134,7 +1134,7 @@ final class LocalTime(_hour: Int, _minute: Int, _second: Int, private val nano: * @param nanosToSubtract * the nanos to subtract, may be negative * @return - * a { @code LocalTime} based on this time with the nanoseconds subtracted, not null + * a {@code LocalTime} based on this time with the nanoseconds subtracted, not null */ def minusNanos(nanosToSubtract: Long): LocalTime = plusNanos(-(nanosToSubtract % LocalTime.NANOS_PER_DAY)) @@ -1228,7 +1228,7 @@ final class LocalTime(_hour: Int, _minute: Int, _second: Int, private val nano: * This instance is immutable and unaffected by this method call. * * @param endExclusive - * the end time, which is converted to a { @code LocalTime}, not null + * the end time, which is converted to a {@code LocalTime}, not null * @param unit * the unit to measure the period in, not null * @return @@ -1323,7 +1323,7 @@ final class LocalTime(_hour: Int, _minute: Int, _second: Int, private val nano: * @return * the comparator value, negative if less, positive if greater * @throws NullPointerException - * if { @code other} is null + * if {@code other} is null */ def compare(other: LocalTime): Int = { var cmp: Int = Integer.compare(hour.toInt, other.hour.toInt) @@ -1350,7 +1350,7 @@ final class LocalTime(_hour: Int, _minute: Int, _second: Int, private val nano: * @return * true if this is after the specified time * @throws NullPointerException - * if { @code other} is null + * if {@code other} is null */ def isAfter(other: LocalTime): Boolean = compareTo(other) > 0 @@ -1364,7 +1364,7 @@ final class LocalTime(_hour: Int, _minute: Int, _second: Int, private val nano: * @return * true if this point is before the specified time * @throws NullPointerException - * if { @code other} is null + * if {@code other} is null */ def isBefore(other: LocalTime): Boolean = compareTo(other) < 0 diff --git a/core/shared/src/main/scala/org/threeten/bp/MonthDay.scala b/core/shared/src/main/scala/org/threeten/bp/MonthDay.scala index 3f607d5b3..4810b2f48 100644 --- a/core/shared/src/main/scala/org/threeten/bp/MonthDay.scala +++ b/core/shared/src/main/scala/org/threeten/bp/MonthDay.scala @@ -179,7 +179,7 @@ object MonthDay { * @return * the month-day, not null * @throws DateTimeException - * if unable to convert to a { @code MonthDay} + * if unable to convert to a {@code MonthDay} */ def from(temporal: TemporalAccessor): MonthDay = { var _temporal = temporal @@ -466,7 +466,7 @@ final class MonthDay private (private val month: Int, private val day: Int) * @param month * the month-of-year to set in the returned month-day, from 1 (January) to 12 (December) * @return - * a { @code MonthDay} based on this month-day with the requested month, not null + * a {@code MonthDay} based on this month-day with the requested month, not null * @throws DateTimeException * if the month-of-year value is invalid */ @@ -483,7 +483,7 @@ final class MonthDay private (private val month: Int, private val day: Int) * @param month * the month-of-year to set in the returned month-day, not null * @return - * a { @code MonthDay} based on this month-day with the requested month, not null + * a {@code MonthDay} based on this month-day with the requested month, not null */ def `with`(month: Month): MonthDay = { Objects.requireNonNull(month, "month") @@ -504,7 +504,7 @@ final class MonthDay private (private val month: Int, private val day: Int) * @param dayOfMonth * the day-of-month to set in the return month-day, from 1 to 31 * @return - * a { @code MonthDay} based on this month-day with the requested day, not null + * a {@code MonthDay} based on this month-day with the requested day, not null * @throws DateTimeException * if the day-of-month value is invalid * @throws DateTimeException diff --git a/core/shared/src/main/scala/org/threeten/bp/OffsetDateTime.scala b/core/shared/src/main/scala/org/threeten/bp/OffsetDateTime.scala index 3c8e19955..e33647dee 100644 --- a/core/shared/src/main/scala/org/threeten/bp/OffsetDateTime.scala +++ b/core/shared/src/main/scala/org/threeten/bp/OffsetDateTime.scala @@ -276,7 +276,7 @@ object OffsetDateTime { * @return * the offset date-time, not null * @throws DateTimeException - * if unable to convert to an { @code OffsetDateTime} + * if unable to convert to an {@code OffsetDateTime} */ def from(temporal: TemporalAccessor): OffsetDateTime = temporal match { @@ -557,7 +557,7 @@ final class OffsetDateTime private ( * @param offset * the zone offset to change to, not null * @return - * an { @code OffsetDateTime} based on this date-time with the requested offset, not null + * an {@code OffsetDateTime} based on this date-time with the requested offset, not null */ def withOffsetSameLocal(offset: ZoneOffset): OffsetDateTime = `with`(dateTime, offset) @@ -578,7 +578,7 @@ final class OffsetDateTime private ( * @param offset * the zone offset to change to, not null * @return - * an { @code OffsetDateTime} based on this date-time with the requested offset, not null + * an {@code OffsetDateTime} based on this date-time with the requested offset, not null * @throws DateTimeException * if the result exceeds the supported date range */ @@ -730,7 +730,7 @@ final class OffsetDateTime private ( * @param adjuster * the adjuster to use, not null * @return - * an { @code OffsetDateTime} based on { @code this} with the adjustment made, not null + * an {@code OffsetDateTime} based on {@code this} with the adjustment made, not null * @throws DateTimeException * if the adjustment cannot be made * @throws ArithmeticException @@ -787,7 +787,7 @@ final class OffsetDateTime private ( * @param newValue * the new value of the field in the result * @return - * an { @code OffsetDateTime} based on { @code this} with the specified field set, not null + * an {@code OffsetDateTime} based on {@code this} with the specified field set, not null * @throws DateTimeException * if the field cannot be set * @throws ArithmeticException @@ -817,7 +817,7 @@ final class OffsetDateTime private ( * @param year * the year to set in the result, from MIN_YEAR to MAX_YEAR * @return - * an { @code OffsetDateTime} based on this date-time with the requested year, not null + * an {@code OffsetDateTime} based on this date-time with the requested year, not null * @throws DateTimeException * if the year value is invalid */ @@ -833,7 +833,7 @@ final class OffsetDateTime private ( * @param month * the month-of-year to set in the result, from 1 (January) to 12 (December) * @return - * an { @code OffsetDateTime} based on this date-time with the requested month, not null + * an {@code OffsetDateTime} based on this date-time with the requested month, not null * @throws DateTimeException * if the month-of-year value is invalid */ @@ -849,7 +849,7 @@ final class OffsetDateTime private ( * @param dayOfMonth * the day-of-month to set in the result, from 1 to 28-31 * @return - * an { @code OffsetDateTime} based on this date-time with the requested day, not null + * an {@code OffsetDateTime} based on this date-time with the requested day, not null * @throws DateTimeException * if the day-of-month value is invalid * @throws DateTimeException @@ -867,7 +867,7 @@ final class OffsetDateTime private ( * @param dayOfYear * the day-of-year to set in the result, from 1 to 365-366 * @return - * an { @code OffsetDateTime} based on this date with the requested day, not null + * an {@code OffsetDateTime} based on this date with the requested day, not null * @throws DateTimeException * if the day-of-year value is invalid * @throws DateTimeException @@ -886,7 +886,7 @@ final class OffsetDateTime private ( * @param hour * the hour-of-day to set in the result, from 0 to 23 * @return - * an { @code OffsetDateTime} based on this date-time with the requested hour, not null + * an {@code OffsetDateTime} based on this date-time with the requested hour, not null * @throws DateTimeException * if the hour value is invalid */ @@ -902,7 +902,7 @@ final class OffsetDateTime private ( * @param minute * the minute-of-hour to set in the result, from 0 to 59 * @return - * an { @code OffsetDateTime} based on this date-time with the requested minute, not null + * an {@code OffsetDateTime} based on this date-time with the requested minute, not null * @throws DateTimeException * if the minute value is invalid */ @@ -918,7 +918,7 @@ final class OffsetDateTime private ( * @param second * the second-of-minute to set in the result, from 0 to 59 * @return - * an { @code OffsetDateTime} based on this date-time with the requested second, not null + * an {@code OffsetDateTime} based on this date-time with the requested second, not null * @throws DateTimeException * if the second value is invalid */ @@ -934,7 +934,7 @@ final class OffsetDateTime private ( * @param nanoOfSecond * the nano-of-second to set in the result, from 0 to 999,999,999 * @return - * an { @code OffsetDateTime} based on this date-time with the requested nanosecond, not null + * an {@code OffsetDateTime} based on this date-time with the requested nanosecond, not null * @throws DateTimeException * if the nanos value is invalid */ @@ -958,7 +958,7 @@ final class OffsetDateTime private ( * @param unit * the unit to truncate to, not null * @return - * an { @code OffsetDateTime} based on this date-time with the time truncated, not null + * an {@code OffsetDateTime} based on this date-time with the time truncated, not null * @throws DateTimeException * if unable to truncate */ @@ -978,7 +978,7 @@ final class OffsetDateTime private ( * @param amount * the amount to add, not null * @return - * an { @code OffsetDateTime} based on this date-time with the addition made, not null + * an {@code OffsetDateTime} based on this date-time with the addition made, not null * @throws DateTimeException * if the addition cannot be made * @throws ArithmeticException @@ -1003,7 +1003,7 @@ final class OffsetDateTime private ( * @param unit * the unit of the period to add, not null * @return - * an { @code OffsetDateTime} based on this date-time with the specified period added, not null + * an {@code OffsetDateTime} based on this date-time with the specified period added, not null * @throws DateTimeException * if the unit cannot be added to this type */ @@ -1027,7 +1027,7 @@ final class OffsetDateTime private ( * @param years * the years to add, may be negative * @return - * an { @code OffsetDateTime} based on this date-time with the years added, not null + * an {@code OffsetDateTime} based on this date-time with the years added, not null * @throws DateTimeException * if the result exceeds the supported date range */ @@ -1048,7 +1048,7 @@ final class OffsetDateTime private ( * @param months * the months to add, may be negative * @return - * an { @code OffsetDateTime} based on this date-time with the months added, not null + * an {@code OffsetDateTime} based on this date-time with the months added, not null * @throws DateTimeException * if the result exceeds the supported date range */ @@ -1068,7 +1068,7 @@ final class OffsetDateTime private ( * @param weeks * the weeks to add, may be negative * @return - * an { @code OffsetDateTime} based on this date-time with the weeks added, not null + * an {@code OffsetDateTime} based on this date-time with the weeks added, not null * @throws DateTimeException * if the result exceeds the supported date range */ @@ -1088,7 +1088,7 @@ final class OffsetDateTime private ( * @param days * the days to add, may be negative * @return - * an { @code OffsetDateTime} based on this date-time with the days added, not null + * an {@code OffsetDateTime} based on this date-time with the days added, not null * @throws DateTimeException * if the result exceeds the supported date range */ @@ -1102,7 +1102,7 @@ final class OffsetDateTime private ( * @param hours * the hours to add, may be negative * @return - * an { @code OffsetDateTime} based on this date-time with the hours added, not null + * an {@code OffsetDateTime} based on this date-time with the hours added, not null * @throws DateTimeException * if the result exceeds the supported date range */ @@ -1116,7 +1116,7 @@ final class OffsetDateTime private ( * @param minutes * the minutes to add, may be negative * @return - * an { @code OffsetDateTime} based on this date-time with the minutes added, not null + * an {@code OffsetDateTime} based on this date-time with the minutes added, not null * @throws DateTimeException * if the result exceeds the supported date range */ @@ -1130,7 +1130,7 @@ final class OffsetDateTime private ( * @param seconds * the seconds to add, may be negative * @return - * an { @code OffsetDateTime} based on this date-time with the seconds added, not null + * an {@code OffsetDateTime} based on this date-time with the seconds added, not null * @throws DateTimeException * if the result exceeds the supported date range */ @@ -1144,7 +1144,7 @@ final class OffsetDateTime private ( * @param nanos * the nanos to add, may be negative * @return - * an { @code OffsetDateTime} based on this date-time with the nanoseconds added, not null + * an {@code OffsetDateTime} based on this date-time with the nanoseconds added, not null * @throws DateTimeException * if the unit cannot be added to this type */ @@ -1164,7 +1164,7 @@ final class OffsetDateTime private ( * @param amount * the amount to subtract, not null * @return - * an { @code OffsetDateTime} based on this date-time with the subtraction made, not null + * an {@code OffsetDateTime} based on this date-time with the subtraction made, not null * @throws DateTimeException * if the subtraction cannot be made * @throws ArithmeticException @@ -1189,7 +1189,7 @@ final class OffsetDateTime private ( * @param unit * the unit of the period to subtract, not null * @return - * an { @code OffsetDateTime} based on this date-time with the specified period subtracted, not + * an {@code OffsetDateTime} based on this date-time with the specified period subtracted, not * null */ override def minus(amountToSubtract: Long, unit: TemporalUnit): OffsetDateTime = @@ -1212,7 +1212,7 @@ final class OffsetDateTime private ( * @param years * the years to subtract, may be negative * @return - * an { @code OffsetDateTime} based on this date-time with the years subtracted, not null + * an {@code OffsetDateTime} based on this date-time with the years subtracted, not null * @throws DateTimeException * if the result exceeds the supported date range */ @@ -1235,7 +1235,7 @@ final class OffsetDateTime private ( * @param months * the months to subtract, may be negative * @return - * an { @code OffsetDateTime} based on this date-time with the months subtracted, not null + * an {@code OffsetDateTime} based on this date-time with the months subtracted, not null * @throws DateTimeException * if the result exceeds the supported date range */ @@ -1257,7 +1257,7 @@ final class OffsetDateTime private ( * @param weeks * the weeks to subtract, may be negative * @return - * an { @code OffsetDateTime} based on this date-time with the weeks subtracted, not null + * an {@code OffsetDateTime} based on this date-time with the weeks subtracted, not null * @throws DateTimeException * if the result exceeds the supported date range */ @@ -1279,7 +1279,7 @@ final class OffsetDateTime private ( * @param days * the days to subtract, may be negative * @return - * an { @code OffsetDateTime} based on this date-time with the days subtracted, not null + * an {@code OffsetDateTime} based on this date-time with the days subtracted, not null * @throws DateTimeException * if the result exceeds the supported date range */ @@ -1295,7 +1295,7 @@ final class OffsetDateTime private ( * @param hours * the hours to subtract, may be negative * @return - * an { @code OffsetDateTime} based on this date-time with the hours subtracted, not null + * an {@code OffsetDateTime} based on this date-time with the hours subtracted, not null * @throws DateTimeException * if the result exceeds the supported date range */ @@ -1311,7 +1311,7 @@ final class OffsetDateTime private ( * @param minutes * the minutes to subtract, may be negative * @return - * an { @code OffsetDateTime} based on this date-time with the minutes subtracted, not null + * an {@code OffsetDateTime} based on this date-time with the minutes subtracted, not null * @throws DateTimeException * if the result exceeds the supported date range */ @@ -1327,7 +1327,7 @@ final class OffsetDateTime private ( * @param seconds * the seconds to subtract, may be negative * @return - * an { @code OffsetDateTime} based on this date-time with the seconds subtracted, not null + * an {@code OffsetDateTime} based on this date-time with the seconds subtracted, not null * @throws DateTimeException * if the result exceeds the supported date range */ @@ -1344,7 +1344,7 @@ final class OffsetDateTime private ( * @param nanos * the nanos to subtract, may be negative * @return - * an { @code OffsetDateTime} based on this date-time with the nanoseconds subtracted, not null + * an {@code OffsetDateTime} based on this date-time with the nanoseconds subtracted, not null * @throws DateTimeException * if the result exceeds the supported date range */ @@ -1453,7 +1453,7 @@ final class OffsetDateTime private ( * This instance is immutable and unaffected by this method call. * * @param endExclusive - * the end date-time, which is converted to an { @code OffsetDateTime}, not null + * the end date-time, which is converted to an {@code OffsetDateTime}, not null * @param unit * the unit to measure the period in, not null * @return @@ -1578,7 +1578,7 @@ final class OffsetDateTime private ( * Converts this date-time to an {@code Instant}. * * @return - * an { @code Instant} representing the same instant, not null + * an {@code Instant} representing the same instant, not null */ def toInstant: Instant = dateTime.toInstant(offset) diff --git a/core/shared/src/main/scala/org/threeten/bp/OffsetTime.scala b/core/shared/src/main/scala/org/threeten/bp/OffsetTime.scala index 7c1d8ad7c..4453a6c6c 100644 --- a/core/shared/src/main/scala/org/threeten/bp/OffsetTime.scala +++ b/core/shared/src/main/scala/org/threeten/bp/OffsetTime.scala @@ -210,7 +210,7 @@ object OffsetTime { * @return * the offset time, not null * @throws DateTimeException - * if unable to convert to an { @code OffsetTime} + * if unable to convert to an {@code OffsetTime} */ def from(temporal: TemporalAccessor): OffsetTime = temporal match { @@ -454,7 +454,7 @@ final class OffsetTime(private val time: LocalTime, private val offset: ZoneOffs * @param offset * the zone offset to change to, not null * @return - * an { @code OffsetTime} based on this time with the requested offset, not null + * an {@code OffsetTime} based on this time with the requested offset, not null */ def withOffsetSameLocal(offset: ZoneOffset): OffsetTime = if (offset != null && (offset == this.offset)) this @@ -477,7 +477,7 @@ final class OffsetTime(private val time: LocalTime, private val offset: ZoneOffs * @param offset * the zone offset to change to, not null * @return - * an { @code OffsetTime} based on this time with the requested offset, not null + * an {@code OffsetTime} based on this time with the requested offset, not null */ def withOffsetSameInstant(offset: ZoneOffset): OffsetTime = if (offset == this.offset) @@ -543,7 +543,7 @@ final class OffsetTime(private val time: LocalTime, private val offset: ZoneOffs * @param adjuster * the adjuster to use, not null * @return - * an { @code OffsetTime} based on { @code this} with the adjustment made, not null + * an {@code OffsetTime} based on {@code this} with the adjustment made, not null * @throws DateTimeException * if the adjustment cannot be made * @throws ArithmeticException @@ -588,7 +588,7 @@ final class OffsetTime(private val time: LocalTime, private val offset: ZoneOffs * @param newValue * the new value of the field in the result * @return - * an { @code OffsetTime} based on { @code this} with the specified field set, not null + * an {@code OffsetTime} based on {@code this} with the specified field set, not null * @throws DateTimeException * if the field cannot be set * @throws ArithmeticException @@ -613,7 +613,7 @@ final class OffsetTime(private val time: LocalTime, private val offset: ZoneOffs * @param hour * the hour-of-day to set in the result, from 0 to 23 * @return - * an { @code OffsetTime} based on this time with the requested hour, not null + * an {@code OffsetTime} based on this time with the requested hour, not null * @throws DateTimeException * if the hour value is invalid */ @@ -629,7 +629,7 @@ final class OffsetTime(private val time: LocalTime, private val offset: ZoneOffs * @param minute * the minute-of-hour to set in the result, from 0 to 59 * @return - * an { @code OffsetTime} based on this time with the requested minute, not null + * an {@code OffsetTime} based on this time with the requested minute, not null * @throws DateTimeException * if the minute value is invalid */ @@ -645,7 +645,7 @@ final class OffsetTime(private val time: LocalTime, private val offset: ZoneOffs * @param second * the second-of-minute to set in the result, from 0 to 59 * @return - * an { @code OffsetTime} based on this time with the requested second, not null + * an {@code OffsetTime} based on this time with the requested second, not null * @throws DateTimeException * if the second value is invalid */ @@ -661,7 +661,7 @@ final class OffsetTime(private val time: LocalTime, private val offset: ZoneOffs * @param nanoOfSecond * the nano-of-second to set in the result, from 0 to 999,999,999 * @return - * an { @code OffsetTime} based on this time with the requested nanosecond, not null + * an {@code OffsetTime} based on this time with the requested nanosecond, not null * @throws DateTimeException * if the nanos value is invalid */ @@ -685,7 +685,7 @@ final class OffsetTime(private val time: LocalTime, private val offset: ZoneOffs * @param unit * the unit to truncate to, not null * @return - * an { @code OffsetTime} based on this time with the time truncated, not null + * an {@code OffsetTime} based on this time with the time truncated, not null * @throws DateTimeException * if unable to truncate */ @@ -705,7 +705,7 @@ final class OffsetTime(private val time: LocalTime, private val offset: ZoneOffs * @param amount * the amount to add, not null * @return - * an { @code OffsetTime} based on this time with the addition made, not null + * an {@code OffsetTime} based on this time with the addition made, not null * @throws DateTimeException * if the addition cannot be made * @throws ArithmeticException @@ -730,7 +730,7 @@ final class OffsetTime(private val time: LocalTime, private val offset: ZoneOffs * @param unit * the unit of the period to add, not null * @return - * an { @code OffsetTime} based on this time with the specified period added, not null + * an {@code OffsetTime} based on this time with the specified period added, not null * @throws DateTimeException * if the unit cannot be added to this type */ @@ -749,7 +749,7 @@ final class OffsetTime(private val time: LocalTime, private val offset: ZoneOffs * @param hours * the hours to add, may be negative * @return - * an { @code OffsetTime} based on this time with the hours added, not null + * an {@code OffsetTime} based on this time with the hours added, not null */ def plusHours(hours: Long): OffsetTime = `with`(time.plusHours(hours), offset) @@ -764,7 +764,7 @@ final class OffsetTime(private val time: LocalTime, private val offset: ZoneOffs * @param minutes * the minutes to add, may be negative * @return - * an { @code OffsetTime} based on this time with the minutes added, not null + * an {@code OffsetTime} based on this time with the minutes added, not null */ def plusMinutes(minutes: Long): OffsetTime = `with`(time.plusMinutes(minutes), offset) @@ -779,7 +779,7 @@ final class OffsetTime(private val time: LocalTime, private val offset: ZoneOffs * @param seconds * the seconds to add, may be negative * @return - * an { @code OffsetTime} based on this time with the seconds added, not null + * an {@code OffsetTime} based on this time with the seconds added, not null */ def plusSeconds(seconds: Long): OffsetTime = `with`(time.plusSeconds(seconds), offset) @@ -794,7 +794,7 @@ final class OffsetTime(private val time: LocalTime, private val offset: ZoneOffs * @param nanos * the nanos to add, may be negative * @return - * an { @code OffsetTime} based on this time with the nanoseconds added, not null + * an {@code OffsetTime} based on this time with the nanoseconds added, not null */ def plusNanos(nanos: Long): OffsetTime = `with`(time.plusNanos(nanos), offset) @@ -812,7 +812,7 @@ final class OffsetTime(private val time: LocalTime, private val offset: ZoneOffs * @param amount * the amount to subtract, not null * @return - * an { @code OffsetTime} based on this time with the subtraction made, not null + * an {@code OffsetTime} based on this time with the subtraction made, not null * @throws DateTimeException * if the subtraction cannot be made * @throws ArithmeticException @@ -837,7 +837,7 @@ final class OffsetTime(private val time: LocalTime, private val offset: ZoneOffs * @param unit * the unit of the period to subtract, not null * @return - * an { @code OffsetTime} based on this time with the specified period subtracted, not null + * an {@code OffsetTime} based on this time with the specified period subtracted, not null * @throws DateTimeException * if the unit cannot be added to this type */ @@ -856,7 +856,7 @@ final class OffsetTime(private val time: LocalTime, private val offset: ZoneOffs * @param hours * the hours to subtract, may be negative * @return - * an { @code OffsetTime} based on this time with the hours subtracted, not null + * an {@code OffsetTime} based on this time with the hours subtracted, not null */ def minusHours(hours: Long): OffsetTime = `with`(time.minusHours(hours), offset) @@ -871,7 +871,7 @@ final class OffsetTime(private val time: LocalTime, private val offset: ZoneOffs * @param minutes * the minutes to subtract, may be negative * @return - * an { @code OffsetTime} based on this time with the minutes subtracted, not null + * an {@code OffsetTime} based on this time with the minutes subtracted, not null */ def minusMinutes(minutes: Long): OffsetTime = `with`(time.minusMinutes(minutes), offset) @@ -886,7 +886,7 @@ final class OffsetTime(private val time: LocalTime, private val offset: ZoneOffs * @param seconds * the seconds to subtract, may be negative * @return - * an { @code OffsetTime} based on this time with the seconds subtracted, not null + * an {@code OffsetTime} based on this time with the seconds subtracted, not null */ def minusSeconds(seconds: Long): OffsetTime = `with`(time.minusSeconds(seconds), offset) @@ -901,7 +901,7 @@ final class OffsetTime(private val time: LocalTime, private val offset: ZoneOffs * @param nanos * the nanos to subtract, may be negative * @return - * an { @code OffsetTime} based on this time with the nanoseconds subtracted, not null + * an {@code OffsetTime} based on this time with the nanoseconds subtracted, not null */ def minusNanos(nanos: Long): OffsetTime = `with`(time.minusNanos(nanos), offset) @@ -1000,7 +1000,7 @@ final class OffsetTime(private val time: LocalTime, private val offset: ZoneOffs * This instance is immutable and unaffected by this method call. * * @param endExclusive - * the end time, which is converted to an { @code OffsetTime}, not null + * the end time, which is converted to an {@code OffsetTime}, not null * @param unit * the unit to measure the period in, not null * @return @@ -1088,7 +1088,7 @@ final class OffsetTime(private val time: LocalTime, private val offset: ZoneOffs * @return * the comparator value, negative if less, positive if greater * @throws NullPointerException - * if { @code other} is null + * if {@code other} is null */ def compare(other: OffsetTime): Int = if (offset == other.offset) diff --git a/core/shared/src/main/scala/org/threeten/bp/Period.scala b/core/shared/src/main/scala/org/threeten/bp/Period.scala index 4bbfddc50..06a1a02a0 100644 --- a/core/shared/src/main/scala/org/threeten/bp/Period.scala +++ b/core/shared/src/main/scala/org/threeten/bp/Period.scala @@ -143,7 +143,7 @@ object Period { * @return * the equivalent period, not null * @throws DateTimeException - * if unable to convert to a { @code Period} + * if unable to convert to a {@code Period} * @throws ArithmeticException * if the amount of years, months or days exceeds an int */ @@ -418,7 +418,7 @@ final class Period private (private val years: Int, private val months: Int, pri * @param years * the years to represent, may be negative * @return - * a { @code Period} based on this period with the requested years, not null + * a {@code Period} based on this period with the requested years, not null */ def withYears(years: Int): Period = if (years == this.years) this @@ -438,7 +438,7 @@ final class Period private (private val years: Int, private val months: Int, pri * @param months * the months to represent, may be negative * @return - * a { @code Period} based on this period with the requested months, not null + * a {@code Period} based on this period with the requested months, not null */ def withMonths(months: Int): Period = if (months == this.months) this @@ -455,7 +455,7 @@ final class Period private (private val years: Int, private val months: Int, pri * @param days * the days to represent, may be negative * @return - * a { @code Period} based on this period with the requested days, not null + * a {@code Period} based on this period with the requested days, not null */ def withDays(days: Int): Period = if (days == this.days) this @@ -475,7 +475,7 @@ final class Period private (private val years: Int, private val months: Int, pri * @param amountToAdd * the period to add, not null * @return - * a { @code Period} based on this period with the requested period added, not null + * a {@code Period} based on this period with the requested period added, not null * @throws ArithmeticException * if numeric overflow occurs */ @@ -499,7 +499,7 @@ final class Period private (private val years: Int, private val months: Int, pri * @param yearsToAdd * the years to add, positive or negative * @return - * a { @code Period} based on this period with the specified years added, not null + * a {@code Period} based on this period with the specified years added, not null * @throws ArithmeticException * if numeric overflow occurs */ @@ -519,7 +519,7 @@ final class Period private (private val years: Int, private val months: Int, pri * @param monthsToAdd * the months to add, positive or negative * @return - * a { @code Period} based on this period with the specified months added, not null + * a {@code Period} based on this period with the specified months added, not null * @throws ArithmeticException * if numeric overflow occurs */ @@ -539,7 +539,7 @@ final class Period private (private val years: Int, private val months: Int, pri * @param daysToAdd * the days to add, positive or negative * @return - * a { @code Period} based on this period with the specified days added, not null + * a {@code Period} based on this period with the specified days added, not null * @throws ArithmeticException * if numeric overflow occurs */ @@ -561,7 +561,7 @@ final class Period private (private val years: Int, private val months: Int, pri * @param amountToSubtract * the period to subtract, not null * @return - * a { @code Period} based on this period with the requested period subtracted, not null + * a {@code Period} based on this period with the requested period subtracted, not null * @throws ArithmeticException * if numeric overflow occurs */ @@ -585,7 +585,7 @@ final class Period private (private val years: Int, private val months: Int, pri * @param yearsToSubtract * the years to subtract, positive or negative * @return - * a { @code Period} based on this period with the specified years subtracted, not null + * a {@code Period} based on this period with the specified years subtracted, not null * @throws ArithmeticException * if numeric overflow occurs */ @@ -605,7 +605,7 @@ final class Period private (private val years: Int, private val months: Int, pri * @param monthsToSubtract * the years to subtract, positive or negative * @return - * a { @code Period} based on this period with the specified months subtracted, not null + * a {@code Period} based on this period with the specified months subtracted, not null * @throws ArithmeticException * if numeric overflow occurs */ @@ -625,7 +625,7 @@ final class Period private (private val years: Int, private val months: Int, pri * @param daysToSubtract * the months to subtract, positive or negative * @return - * a { @code Period} based on this period with the specified days subtracted, not null + * a {@code Period} based on this period with the specified days subtracted, not null * @throws ArithmeticException * if numeric overflow occurs */ @@ -642,7 +642,7 @@ final class Period private (private val years: Int, private val months: Int, pri * @param scalar * the scalar to multiply by, not null * @return - * a { @code Period} based on this period with the amounts multiplied by the scalar, not null + * a {@code Period} based on this period with the amounts multiplied by the scalar, not null * @throws ArithmeticException * if numeric overflow occurs */ @@ -658,7 +658,7 @@ final class Period private (private val years: Int, private val months: Int, pri * Returns a new instance with each amount in this period negated. * * @return - * a { @code Period} based on this period with the amounts negated, not null + * a {@code Period} based on this period with the amounts negated, not null * @throws ArithmeticException * if numeric overflow occurs */ @@ -680,7 +680,7 @@ final class Period private (private val years: Int, private val months: Int, pri * This instance is immutable and unaffected by this method call. * * @return - * a { @code Period} based on this period with excess months normalized to years, not null + * a {@code Period} based on this period with excess months normalized to years, not null * @throws ArithmeticException * if numeric overflow occurs */ diff --git a/core/shared/src/main/scala/org/threeten/bp/Year.scala b/core/shared/src/main/scala/org/threeten/bp/Year.scala index da7cb846c..06d529068 100644 --- a/core/shared/src/main/scala/org/threeten/bp/Year.scala +++ b/core/shared/src/main/scala/org/threeten/bp/Year.scala @@ -129,7 +129,7 @@ object Year { * 1BC/BCE is represented by 0.
The year 2BC/BCE is represented by -1.
* * @param isoYear - * the ISO proleptic year to represent, from { @code MIN_VALUE} to { @code MAX_VALUE} + * the ISO proleptic year to represent, from {@code MIN_VALUE} to {@code MAX_VALUE} * @return * the year, not null * @throws DateTimeException @@ -158,7 +158,7 @@ object Year { * @return * the year, not null * @throws DateTimeException - * if unable to convert to a { @code Year} + * if unable to convert to a {@code Year} */ def from(temporal: TemporalAccessor): Year = { var _temporal = temporal @@ -281,7 +281,7 @@ final class Year private (private val year: Int) * The year returned by this method is proleptic as per {@code get(YEAR)}. * * @return - * the year, { @code MIN_VALUE} to { @code MAX_VALUE} + * the year, {@code MIN_VALUE} to {@code MAX_VALUE} */ def getValue: Int = year @@ -463,7 +463,7 @@ final class Year private (private val year: Int) * @param adjuster * the adjuster to use, not null * @return - * a { @code Year} based on { @code this} with the adjustment made, not null + * a {@code Year} based on {@code this} with the adjustment made, not null * @throws DateTimeException * if the adjustment cannot be made * @throws ArithmeticException @@ -502,7 +502,7 @@ final class Year private (private val year: Int) * @param newValue * the new value of the field in the result * @return - * a { @code Year} based on { @code this} with the specified field set, not null + * a {@code Year} based on {@code this} with the specified field set, not null * @throws DateTimeException * if the field cannot be set * @throws ArithmeticException @@ -535,7 +535,7 @@ final class Year private (private val year: Int) * @param amount * the amount to add, not null * @return - * a { @code Year} based on this year with the addition made, not null + * a {@code Year} based on this year with the addition made, not null * @throws DateTimeException * if the addition cannot be made * @throws ArithmeticException @@ -547,9 +547,9 @@ final class Year private (private val year: Int) * {@inheritDoc} * * @throws DateTimeException - * { @inheritDoc} + * {@inheritDoc} * @throws ArithmeticException - * { @inheritDoc} + * {@inheritDoc} */ def plus(amountToAdd: Long, unit: TemporalUnit): Year = unit match { @@ -574,7 +574,7 @@ final class Year private (private val year: Int) * @param yearsToAdd * the years to add, may be negative * @return - * a { @code Year} based on this year with the period added, not null + * a {@code Year} based on this year with the period added, not null * @throws DateTimeException * if the result exceeds the supported year range */ @@ -597,7 +597,7 @@ final class Year private (private val year: Int) * @param amount * the amount to subtract, not null * @return - * a { @code Year} based on this year with the subtraction made, not null + * a {@code Year} based on this year with the subtraction made, not null * @throws DateTimeException * if the subtraction cannot be made * @throws ArithmeticException @@ -609,9 +609,9 @@ final class Year private (private val year: Int) * {@inheritDoc} * * @throws DateTimeException - * { @inheritDoc} + * {@inheritDoc} * @throws ArithmeticException - * { @inheritDoc} + * {@inheritDoc} */ override def minus(amountToSubtract: Long, unit: TemporalUnit): Year = if (amountToSubtract == Long.MinValue) plus(Long.MaxValue, unit).plus(1, unit) @@ -625,7 +625,7 @@ final class Year private (private val year: Int) * @param yearsToSubtract * the years to subtract, may be negative * @return - * a { @code Year} based on this year with the period subtracted, not null + * a {@code Year} based on this year with the period subtracted, not null * @throws DateTimeException * if the result exceeds the supported year range */ @@ -729,7 +729,7 @@ final class Year private (private val year: Int) * This instance is immutable and unaffected by this method call. * * @param endExclusive - * the end year, which is converted to a { @code Year}, not null + * the end year, which is converted to a {@code Year}, not null * @param unit * the unit to measure the period in, not null * @return diff --git a/core/shared/src/main/scala/org/threeten/bp/YearMonth.scala b/core/shared/src/main/scala/org/threeten/bp/YearMonth.scala index b26ae855c..6737c6d69 100644 --- a/core/shared/src/main/scala/org/threeten/bp/YearMonth.scala +++ b/core/shared/src/main/scala/org/threeten/bp/YearMonth.scala @@ -190,7 +190,7 @@ object YearMonth { * @return * the year-month, not null * @throws DateTimeException - * if unable to convert to a { @code YearMonth} + * if unable to convert to a {@code YearMonth} */ def from(temporal: TemporalAccessor): YearMonth = { var _temporal = temporal @@ -520,7 +520,7 @@ final class YearMonth private (private val year: Int, private val month: Int) * @param adjuster * the adjuster to use, not null * @return - * a { @code YearMonth} based on { @code this} with the adjustment made, not null + * a {@code YearMonth} based on {@code this} with the adjustment made, not null * @throws DateTimeException * if the adjustment cannot be made * @throws ArithmeticException @@ -562,7 +562,7 @@ final class YearMonth private (private val year: Int, private val month: Int) * @param newValue * the new value of the field in the result * @return - * a { @code YearMonth} based on { @code this} with the specified field set, not null + * a {@code YearMonth} based on {@code this} with the specified field set, not null * @throws DateTimeException * if the field cannot be set * @throws ArithmeticException @@ -598,7 +598,7 @@ final class YearMonth private (private val year: Int, private val month: Int) * @param year * the year to set in the returned year-month, from MIN_YEAR to MAX_YEAR * @return - * a { @code YearMonth} based on this year-month with the requested year, not null + * a {@code YearMonth} based on this year-month with the requested year, not null * @throws DateTimeException * if the year value is invalid */ @@ -615,7 +615,7 @@ final class YearMonth private (private val year: Int, private val month: Int) * @param month * the month-of-year to set in the returned year-month, from 1 (January) to 12 (December) * @return - * a { @code YearMonth} based on this year-month with the requested month, not null + * a {@code YearMonth} based on this year-month with the requested month, not null * @throws DateTimeException * if the month-of-year value is invalid */ @@ -637,7 +637,7 @@ final class YearMonth private (private val year: Int, private val month: Int) * @param amount * the amount to add, not null * @return - * a { @code YearMonth} based on this year-month with the addition made, not null + * a {@code YearMonth} based on this year-month with the addition made, not null * @throws DateTimeException * if the addition cannot be made * @throws ArithmeticException @@ -649,9 +649,9 @@ final class YearMonth private (private val year: Int, private val month: Int) * {@inheritDoc} * * @throws DateTimeException - * { @inheritDoc} + * {@inheritDoc} * @throws ArithmeticException - * { @inheritDoc} + * {@inheritDoc} */ def plus(amountToAdd: Long, unit: TemporalUnit): YearMonth = if (unit.isInstanceOf[ChronoUnit]) @@ -675,7 +675,7 @@ final class YearMonth private (private val year: Int, private val month: Int) * @param yearsToAdd * the years to add, may be negative * @return - * a { @code YearMonth} based on this year-month with the years added, not null + * a {@code YearMonth} based on this year-month with the years added, not null * @throws DateTimeException * if the result exceeds the supported range */ @@ -695,7 +695,7 @@ final class YearMonth private (private val year: Int, private val month: Int) * @param monthsToAdd * the months to add, may be negative * @return - * a { @code YearMonth} based on this year-month with the months added, not null + * a {@code YearMonth} based on this year-month with the months added, not null * @throws DateTimeException * if the result exceeds the supported range */ @@ -722,7 +722,7 @@ final class YearMonth private (private val year: Int, private val month: Int) * @param amount * the amount to aubtract, not null * @return - * a { @code YearMonth} based on this year-month with the subtraction made, not null + * a {@code YearMonth} based on this year-month with the subtraction made, not null * @throws DateTimeException * if the subtraction cannot be made * @throws ArithmeticException @@ -735,9 +735,9 @@ final class YearMonth private (private val year: Int, private val month: Int) * {@inheritDoc} * * @throws DateTimeException - * { @inheritDoc} + * {@inheritDoc} * @throws ArithmeticException - * { @inheritDoc} + * {@inheritDoc} */ override def minus(amountToSubtract: Long, unit: TemporalUnit): YearMonth = if (amountToSubtract == Long.MinValue) plus(Long.MaxValue, unit).plus(1, unit) @@ -751,7 +751,7 @@ final class YearMonth private (private val year: Int, private val month: Int) * @param yearsToSubtract * the years to subtract, may be negative * @return - * a { @code YearMonth} based on this year-month with the years subtracted, not null + * a {@code YearMonth} based on this year-month with the years subtracted, not null * @throws DateTimeException * if the result exceeds the supported range */ @@ -767,7 +767,7 @@ final class YearMonth private (private val year: Int, private val month: Int) * @param monthsToSubtract * the months to subtract, may be negative * @return - * a { @code YearMonth} based on this year-month with the months subtracted, not null + * a {@code YearMonth} based on this year-month with the months subtracted, not null * @throws DateTimeException * if the result exceeds the supported range */ @@ -874,7 +874,7 @@ final class YearMonth private (private val year: Int, private val month: Int) * This instance is immutable and unaffected by this method call. * * @param endExclusive - * the end year-month, which is converted to a { @code YearMonth}, not null + * the end year-month, which is converted to a {@code YearMonth}, not null * @param unit * the unit to measure the period in, not null * @return diff --git a/core/shared/src/main/scala/org/threeten/bp/ZoneId.scala b/core/shared/src/main/scala/org/threeten/bp/ZoneId.scala index 4c24a006f..00b17043d 100644 --- a/core/shared/src/main/scala/org/threeten/bp/ZoneId.scala +++ b/core/shared/src/main/scala/org/threeten/bp/ZoneId.scala @@ -269,7 +269,7 @@ object ZoneId { * @return * the zone ID, not null * @throws DateTimeException - * if unable to convert to a { @code ZoneId} + * if unable to convert to a {@code ZoneId} */ def from(temporal: TemporalAccessor): ZoneId = { val obj: ZoneId = temporal.query(TemporalQueries.zone) @@ -407,7 +407,7 @@ abstract class ZoneId private[bp] () extends Serializable { .appendZoneText(style) .toFormatter(locale) .format(new TemporalAccessor() { - def isSupported(field: TemporalField): Boolean = false + def isSupported(field: TemporalField): Boolean = false def getLong(field: TemporalField): Long = throw new UnsupportedTemporalTypeException(s"Unsupported field: $field") override def query[R](query: TemporalQuery[R]): R = diff --git a/core/shared/src/main/scala/org/threeten/bp/ZoneOffset.scala b/core/shared/src/main/scala/org/threeten/bp/ZoneOffset.scala index b82705208..f0f743953 100644 --- a/core/shared/src/main/scala/org/threeten/bp/ZoneOffset.scala +++ b/core/shared/src/main/scala/org/threeten/bp/ZoneOffset.scala @@ -247,7 +247,7 @@ object ZoneOffset { * @return * the zone-offset, not null * @throws DateTimeException - * if unable to convert to an { @code ZoneOffset} + * if unable to convert to an {@code ZoneOffset} */ def from(temporal: TemporalAccessor): ZoneOffset = { val offset: ZoneOffset = temporal.query(TemporalQueries.offset) @@ -637,7 +637,7 @@ final class ZoneOffset private (private val totalSeconds: Int) * @return * the comparator value, negative if less, postive if greater * @throws NullPointerException - * if { @code other} is null + * if {@code other} is null */ def compare(other: ZoneOffset): Int = other.totalSeconds - totalSeconds diff --git a/core/shared/src/main/scala/org/threeten/bp/ZonedDateTime.scala b/core/shared/src/main/scala/org/threeten/bp/ZonedDateTime.scala index 60cfe322c..80558dd23 100644 --- a/core/shared/src/main/scala/org/threeten/bp/ZonedDateTime.scala +++ b/core/shared/src/main/scala/org/threeten/bp/ZonedDateTime.scala @@ -415,7 +415,7 @@ object ZonedDateTime { * @return * the zoned date-time, not null * @throws DateTimeException - * if unable to convert to an { @code ZonedDateTime} + * if unable to convert to an {@code ZonedDateTime} */ def from(temporal: TemporalAccessor): ZonedDateTime = temporal match { @@ -756,7 +756,7 @@ final class ZonedDateTime( * This instance is immutable and unaffected by this method call. * * @return - * a { @code ZonedDateTime} based on this date-time with the earlier offset, not null + * a {@code ZonedDateTime} based on this date-time with the earlier offset, not null */ def withEarlierOffsetAtOverlap: ZonedDateTime = { val trans: ZoneOffsetTransition = getZone.getRules.getTransition(dateTime) @@ -782,7 +782,7 @@ final class ZonedDateTime( * This instance is immutable and unaffected by this method call. * * @return - * a { @code ZonedDateTime} based on this date-time with the later offset, not null + * a {@code ZonedDateTime} based on this date-time with the later offset, not null */ def withLaterOffsetAtOverlap: ZonedDateTime = { val trans: ZoneOffsetTransition = getZone.getRules.getTransition(toLocalDateTime) @@ -826,7 +826,7 @@ final class ZonedDateTime( * @param zone * the time-zone to change to, not null * @return - * a { @code ZonedDateTime} based on this date-time with the requested zone, not null + * a {@code ZonedDateTime} based on this date-time with the requested zone, not null */ def withZoneSameLocal(zone: ZoneId): ZonedDateTime = { Objects.requireNonNull(zone, "zone") @@ -847,7 +847,7 @@ final class ZonedDateTime( * @param zone * the time-zone to change to, not null * @return - * a { @code ZonedDateTime} based on this date-time with the requested zone, not null + * a {@code ZonedDateTime} based on this date-time with the requested zone, not null * @throws DateTimeException * if the result exceeds the supported date range */ @@ -871,7 +871,7 @@ final class ZonedDateTime( * This is equivalent to {@code ZonedDateTime.of(zdt.getDateTime(), zdt.getOffset())}. * * @return - * a { @code ZonedDateTime} with the zone ID set to the offset, not null + * a {@code ZonedDateTime} with the zone ID set to the offset, not null */ def withFixedOffsetZone: ZonedDateTime = if (this.zone == offset) this @@ -1025,7 +1025,7 @@ final class ZonedDateTime( * @param adjuster * the adjuster to use, not null * @return - * a { @code ZonedDateTime} based on { @code this} with the adjustment made, not null + * a {@code ZonedDateTime} based on {@code this} with the adjustment made, not null * @throws DateTimeException * if the adjustment cannot be made * @throws ArithmeticException @@ -1088,7 +1088,7 @@ final class ZonedDateTime( * @param newValue * the new value of the field in the result * @return - * a { @code ZonedDateTime} based on { @code this} with the specified field set, not null + * a {@code ZonedDateTime} based on {@code this} with the specified field set, not null * @throws DateTimeException * if the field cannot be set * @throws UnsupportedTemporalTypeException @@ -1125,7 +1125,7 @@ final class ZonedDateTime( * @param year * the year to set in the result, from MIN_YEAR to MAX_YEAR * @return - * a { @code ZonedDateTime} based on this date-time with the requested year, not null + * a {@code ZonedDateTime} based on this date-time with the requested year, not null * @throws DateTimeException * if the year value is invalid */ @@ -1147,7 +1147,7 @@ final class ZonedDateTime( * @param month * the month-of-year to set in the result, from 1 (January) to 12 (December) * @return - * a { @code ZonedDateTime} based on this date-time with the requested month, not null + * a {@code ZonedDateTime} based on this date-time with the requested month, not null * @throws DateTimeException * if the month-of-year value is invalid */ @@ -1169,7 +1169,7 @@ final class ZonedDateTime( * @param dayOfMonth * the day-of-month to set in the result, from 1 to 28-31 * @return - * a { @code ZonedDateTime} based on this date-time with the requested day, not null + * a {@code ZonedDateTime} based on this date-time with the requested day, not null * @throws DateTimeException * if the day-of-month value is invalid * @throws DateTimeException @@ -1194,7 +1194,7 @@ final class ZonedDateTime( * @param dayOfYear * the day-of-year to set in the result, from 1 to 365-366 * @return - * a { @code ZonedDateTime} based on this date with the requested day, not null + * a {@code ZonedDateTime} based on this date with the requested day, not null * @throws DateTimeException * if the day-of-year value is invalid * @throws DateTimeException @@ -1218,7 +1218,7 @@ final class ZonedDateTime( * @param hour * the hour-of-day to set in the result, from 0 to 23 * @return - * a { @code ZonedDateTime} based on this date-time with the requested hour, not null + * a {@code ZonedDateTime} based on this date-time with the requested hour, not null * @throws DateTimeException * if the hour value is invalid */ @@ -1240,7 +1240,7 @@ final class ZonedDateTime( * @param minute * the minute-of-hour to set in the result, from 0 to 59 * @return - * a { @code ZonedDateTime} based on this date-time with the requested minute, not null + * a {@code ZonedDateTime} based on this date-time with the requested minute, not null * @throws DateTimeException * if the minute value is invalid */ @@ -1262,7 +1262,7 @@ final class ZonedDateTime( * @param second * the second-of-minute to set in the result, from 0 to 59 * @return - * a { @code ZonedDateTime} based on this date-time with the requested second, not null + * a {@code ZonedDateTime} based on this date-time with the requested second, not null * @throws DateTimeException * if the second value is invalid */ @@ -1284,7 +1284,7 @@ final class ZonedDateTime( * @param nanoOfSecond * the nano-of-second to set in the result, from 0 to 999,999,999 * @return - * a { @code ZonedDateTime} based on this date-time with the requested nanosecond, not null + * a {@code ZonedDateTime} based on this date-time with the requested nanosecond, not null * @throws DateTimeException * if the nano value is invalid */ @@ -1314,7 +1314,7 @@ final class ZonedDateTime( * @param unit * the unit to truncate to, not null * @return - * a { @code ZonedDateTime} based on this date-time with the time truncated, not null + * a {@code ZonedDateTime} based on this date-time with the time truncated, not null * @throws DateTimeException * if unable to truncate */ @@ -1333,7 +1333,7 @@ final class ZonedDateTime( * @param amount * the amount to add, not null * @return - * a { @code ZonedDateTime} based on this date-time with the addition made, not null + * a {@code ZonedDateTime} based on this date-time with the addition made, not null * @throws DateTimeException * if the addition cannot be made * @throws ArithmeticException @@ -1367,7 +1367,7 @@ final class ZonedDateTime( * @param unit * the unit of the period to add, not null * @return - * a { @code ZonedDateTime} based on this date-time with the specified period added, not null + * a {@code ZonedDateTime} based on this date-time with the specified period added, not null * @throws DateTimeException * if the unit cannot be added to this type */ @@ -1394,7 +1394,7 @@ final class ZonedDateTime( * @param years * the years to add, may be negative * @return - * a { @code ZonedDateTime} based on this date-time with the years added, not null + * a {@code ZonedDateTime} based on this date-time with the years added, not null * @throws DateTimeException * if the result exceeds the supported date range */ @@ -1416,7 +1416,7 @@ final class ZonedDateTime( * @param months * the months to add, may be negative * @return - * a { @code ZonedDateTime} based on this date-time with the months added, not null + * a {@code ZonedDateTime} based on this date-time with the months added, not null * @throws DateTimeException * if the result exceeds the supported date range */ @@ -1438,7 +1438,7 @@ final class ZonedDateTime( * @param weeks * the weeks to add, may be negative * @return - * a { @code ZonedDateTime} based on this date-time with the weeks added, not null + * a {@code ZonedDateTime} based on this date-time with the weeks added, not null * @throws DateTimeException * if the result exceeds the supported date range */ @@ -1460,7 +1460,7 @@ final class ZonedDateTime( * @param days * the days to add, may be negative * @return - * a { @code ZonedDateTime} based on this date-time with the days added, not null + * a {@code ZonedDateTime} based on this date-time with the days added, not null * @throws DateTimeException * if the result exceeds the supported date range */ @@ -1485,7 +1485,7 @@ final class ZonedDateTime( * @param hours * the hours to add, may be negative * @return - * a { @code ZonedDateTime} based on this date-time with the hours added, not null + * a {@code ZonedDateTime} based on this date-time with the hours added, not null * @throws DateTimeException * if the result exceeds the supported date range */ @@ -1503,7 +1503,7 @@ final class ZonedDateTime( * @param minutes * the minutes to add, may be negative * @return - * a { @code ZonedDateTime} based on this date-time with the minutes added, not null + * a {@code ZonedDateTime} based on this date-time with the minutes added, not null * @throws DateTimeException * if the result exceeds the supported date range */ @@ -1521,7 +1521,7 @@ final class ZonedDateTime( * @param seconds * the seconds to add, may be negative * @return - * a { @code ZonedDateTime} based on this date-time with the seconds added, not null + * a {@code ZonedDateTime} based on this date-time with the seconds added, not null * @throws DateTimeException * if the result exceeds the supported date range */ @@ -1539,7 +1539,7 @@ final class ZonedDateTime( * @param nanos * the nanos to add, may be negative * @return - * a { @code ZonedDateTime} based on this date-time with the nanoseconds added, not null + * a {@code ZonedDateTime} based on this date-time with the nanoseconds added, not null * @throws DateTimeException * if the result exceeds the supported date range */ @@ -1558,7 +1558,7 @@ final class ZonedDateTime( * @param amount * the amount to subtract, not null * @return - * a { @code ZonedDateTime} based on this date-time with the subtraction made, not null + * a {@code ZonedDateTime} based on this date-time with the subtraction made, not null * @throws DateTimeException * if the subtraction cannot be made * @throws ArithmeticException @@ -1592,7 +1592,7 @@ final class ZonedDateTime( * @param unit * the unit of the period to subtract, not null * @return - * a { @code ZonedDateTime} based on this date-time with the specified period subtracted, not + * a {@code ZonedDateTime} based on this date-time with the specified period subtracted, not * null * @throws DateTimeException * if the unit cannot be added to this type @@ -1617,7 +1617,7 @@ final class ZonedDateTime( * @param years * the years to subtract, may be negative * @return - * a { @code ZonedDateTime} based on this date-time with the years subtracted, not null + * a {@code ZonedDateTime} based on this date-time with the years subtracted, not null * @throws DateTimeException * if the result exceeds the supported date range */ @@ -1641,7 +1641,7 @@ final class ZonedDateTime( * @param months * the months to subtract, may be negative * @return - * a { @code ZonedDateTime} based on this date-time with the months subtracted, not null + * a {@code ZonedDateTime} based on this date-time with the months subtracted, not null * @throws DateTimeException * if the result exceeds the supported date range */ @@ -1665,7 +1665,7 @@ final class ZonedDateTime( * @param weeks * the weeks to subtract, may be negative * @return - * a { @code ZonedDateTime} based on this date-time with the weeks subtracted, not null + * a {@code ZonedDateTime} based on this date-time with the weeks subtracted, not null * @throws DateTimeException * if the result exceeds the supported date range */ @@ -1689,7 +1689,7 @@ final class ZonedDateTime( * @param days * the days to subtract, may be negative * @return - * a { @code ZonedDateTime} based on this date-time with the days subtracted, not null + * a {@code ZonedDateTime} based on this date-time with the days subtracted, not null * @throws DateTimeException * if the result exceeds the supported date range */ @@ -1716,7 +1716,7 @@ final class ZonedDateTime( * @param hours * the hours to subtract, may be negative * @return - * a { @code ZonedDateTime} based on this date-time with the hours subtracted, not null + * a {@code ZonedDateTime} based on this date-time with the hours subtracted, not null * @throws DateTimeException * if the result exceeds the supported date range */ @@ -1736,7 +1736,7 @@ final class ZonedDateTime( * @param minutes * the minutes to subtract, may be negative * @return - * a { @code ZonedDateTime} based on this date-time with the minutes subtracted, not null + * a {@code ZonedDateTime} based on this date-time with the minutes subtracted, not null * @throws DateTimeException * if the result exceeds the supported date range */ @@ -1756,7 +1756,7 @@ final class ZonedDateTime( * @param seconds * the seconds to subtract, may be negative * @return - * a { @code ZonedDateTime} based on this date-time with the seconds subtracted, not null + * a {@code ZonedDateTime} based on this date-time with the seconds subtracted, not null * @throws DateTimeException * if the result exceeds the supported date range */ @@ -1777,7 +1777,7 @@ final class ZonedDateTime( * @param nanos * the nanos to subtract, may be negative * @return - * a { @code ZonedDateTime} based on this date-time with the nanoseconds subtracted, not null + * a {@code ZonedDateTime} based on this date-time with the nanoseconds subtracted, not null * @throws DateTimeException * if the result exceeds the supported date range */ @@ -1858,7 +1858,7 @@ final class ZonedDateTime( * This instance is immutable and unaffected by this method call. * * @param endExclusive - * the end date-time, which is converted to a { @code ZonedDateTime}, not null + * the end date-time, which is converted to a {@code ZonedDateTime}, not null * @param unit * the unit to measure the period in, not null * @return diff --git a/core/shared/src/main/scala/org/threeten/bp/chrono/ChronoLocalDate.scala b/core/shared/src/main/scala/org/threeten/bp/chrono/ChronoLocalDate.scala index 897d6880f..c97176e18 100644 --- a/core/shared/src/main/scala/org/threeten/bp/chrono/ChronoLocalDate.scala +++ b/core/shared/src/main/scala/org/threeten/bp/chrono/ChronoLocalDate.scala @@ -101,7 +101,7 @@ object ChronoLocalDate { * @return * the date, not null * @throws DateTimeException - * if unable to convert to a { @code ChronoLocalDate} + * if unable to convert to a {@code ChronoLocalDate} * @see * Chronology#date(TemporalAccessor) */ diff --git a/core/shared/src/main/scala/org/threeten/bp/chrono/ChronoPeriod.scala b/core/shared/src/main/scala/org/threeten/bp/chrono/ChronoPeriod.scala index 585246818..5352b11fc 100644 --- a/core/shared/src/main/scala/org/threeten/bp/chrono/ChronoPeriod.scala +++ b/core/shared/src/main/scala/org/threeten/bp/chrono/ChronoPeriod.scala @@ -97,7 +97,7 @@ trait ChronoPeriod extends TemporalAmount { * unsupported unit will throw an exception. * * @param unit - * the { @code TemporalUnit} for which to return the value + * the {@code TemporalUnit} for which to return the value * @return * the long value of the unit * @throws DateTimeException @@ -177,7 +177,7 @@ trait ChronoPeriod extends TemporalAmount { * @param amountToAdd * the period to add, not null * @return - * a { @code ChronoPeriod} based on this period with the requested period added, not null + * a {@code ChronoPeriod} based on this period with the requested period added, not null * @throws ArithmeticException * if numeric overflow occurs */ @@ -195,7 +195,7 @@ trait ChronoPeriod extends TemporalAmount { * @param amountToSubtract * the period to subtract, not null * @return - * a { @code ChronoPeriod} based on this period with the requested period subtracted, not null + * a {@code ChronoPeriod} based on this period with the requested period subtracted, not null * @throws ArithmeticException * if numeric overflow occurs */ @@ -212,7 +212,7 @@ trait ChronoPeriod extends TemporalAmount { * @param scalar * the scalar to multiply by, not null * @return - * a { @code ChronoPeriod} based on this period with the amounts multiplied by the scalar, not + * a {@code ChronoPeriod} based on this period with the amounts multiplied by the scalar, not * null * @throws ArithmeticException * if numeric overflow occurs @@ -227,7 +227,7 @@ trait ChronoPeriod extends TemporalAmount { * normalization is performed. * * @return - * a { @code ChronoPeriod} based on this period with the amounts negated, not null + * a {@code ChronoPeriod} based on this period with the amounts negated, not null * @throws ArithmeticException * if numeric overflow occurs, which only happens if one of the units has the value { @code * Long.MIN_VALUE} @@ -244,7 +244,7 @@ trait ChronoPeriod extends TemporalAmount { * This instance is immutable and unaffected by this method call. * * @return - * a { @code ChronoPeriod} based on this period with the amounts of each unit normalized, not + * a {@code ChronoPeriod} based on this period with the amounts of each unit normalized, not * null * @throws ArithmeticException * if numeric overflow occurs diff --git a/core/shared/src/main/scala/org/threeten/bp/chrono/ChronoZonedDateTime.scala b/core/shared/src/main/scala/org/threeten/bp/chrono/ChronoZonedDateTime.scala index 7923a2049..3bc3d4945 100644 --- a/core/shared/src/main/scala/org/threeten/bp/chrono/ChronoZonedDateTime.scala +++ b/core/shared/src/main/scala/org/threeten/bp/chrono/ChronoZonedDateTime.scala @@ -110,7 +110,7 @@ object ChronoZonedDateTime { * @return * the date-time, not null * @throws DateTimeException - * if unable to convert to a { @code ChronoZonedDateTime} + * if unable to convert to a {@code ChronoZonedDateTime} * @see * Chronology#zonedDateTime(TemporalAccessor) */ @@ -259,7 +259,7 @@ trait ChronoZonedDateTime[D <: ChronoLocalDate] * This instance is immutable and unaffected by this method call. * * @return - * a { @code ZoneChronoDateTime} based on this date-time with the earlier offset, not null + * a {@code ZoneChronoDateTime} based on this date-time with the earlier offset, not null * @throws DateTimeException * if no rules can be found for the zone * @throws DateTimeException @@ -281,7 +281,7 @@ trait ChronoZonedDateTime[D <: ChronoLocalDate] * This instance is immutable and unaffected by this method call. * * @return - * a { @code ChronoZonedDateTime} based on this date-time with the later offset, not null + * a {@code ChronoZonedDateTime} based on this date-time with the later offset, not null * @throws DateTimeException * if no rules can be found for the zone * @throws DateTimeException @@ -303,7 +303,7 @@ trait ChronoZonedDateTime[D <: ChronoLocalDate] * @param zoneId * the time-zone to change to, not null * @return - * a { @code ChronoZonedDateTime} based on this date-time with the requested zone, not null + * a {@code ChronoZonedDateTime} based on this date-time with the requested zone, not null */ def withZoneSameLocal(zoneId: ZoneId): ChronoZonedDateTime[D] @@ -321,7 +321,7 @@ trait ChronoZonedDateTime[D <: ChronoLocalDate] * @param zoneId * the time-zone to change to, not null * @return - * a { @code ChronoZonedDateTime} based on this date-time with the requested zone, not null + * a {@code ChronoZonedDateTime} based on this date-time with the requested zone, not null * @throws DateTimeException * if the result exceeds the supported date range */ @@ -377,7 +377,7 @@ trait ChronoZonedDateTime[D <: ChronoLocalDate] * #getOffset() offset}. * * @return - * an { @code Instant} representing the same instant, not null + * an {@code Instant} representing the same instant, not null */ def toInstant: Instant = Instant.ofEpochSecond(toEpochSecond, toLocalTime.getNano.toLong) diff --git a/core/shared/src/main/scala/org/threeten/bp/chrono/Chronology.scala b/core/shared/src/main/scala/org/threeten/bp/chrono/Chronology.scala index cc9f29793..b50164a0c 100644 --- a/core/shared/src/main/scala/org/threeten/bp/chrono/Chronology.scala +++ b/core/shared/src/main/scala/org/threeten/bp/chrono/Chronology.scala @@ -81,7 +81,7 @@ object Chronology { * @return * the chronology, not null * @throws DateTimeException - * if unable to convert to an { @code Chronology} + * if unable to convert to an {@code Chronology} */ def from(temporal: TemporalAccessor): Chronology = { Objects.requireNonNull(temporal, "temporal") @@ -290,7 +290,7 @@ trait Chronology extends Ordered[Chronology] { * @param temporal * a date-time to cast, not null * @return - * the date-time checked and cast to { @code ChronoLocalDate}, not null + * the date-time checked and cast to {@code ChronoLocalDate}, not null * @throws ClassCastException * if the date-time cannot be cast to ChronoLocalDate or the chronology is not equal this Chrono */ @@ -309,7 +309,7 @@ trait Chronology extends Ordered[Chronology] { * @param temporal * a date-time to cast, not null * @return - * the date-time checked and cast to { @code ChronoLocalDateTime}, not null + * the date-time checked and cast to {@code ChronoLocalDateTime}, not null * @throws ClassCastException * if the date-time cannot be cast to ChronoLocalDateTimeImpl or the chronology is not equal * this Chrono @@ -331,7 +331,7 @@ trait Chronology extends Ordered[Chronology] { * @param temporal * a date-time to cast, not null * @return - * the date-time checked and cast to { @code ChronoZonedDateTimeImpl}, not null + * the date-time checked and cast to {@code ChronoZonedDateTimeImpl}, not null * @throws ClassCastException * if the date-time cannot be cast to ChronoZonedDateTimeImpl or the chronology is not equal * this Chrono @@ -392,7 +392,7 @@ trait Chronology extends Ordered[Chronology] { * @throws DateTimeException * if unable to create the date * @throws ClassCastException - * if the { @code era} is not of the correct type for the chronology + * if the {@code era} is not of the correct type for the chronology */ def date(era: Era, yearOfEra: Int, month: Int, dayOfMonth: Int): ChronoLocalDate = date(prolepticYear(era, yearOfEra), month, dayOfMonth) @@ -428,7 +428,7 @@ trait Chronology extends Ordered[Chronology] { * @throws DateTimeException * if unable to create the date * @throws ClassCastException - * if the { @code era} is not of the correct type for the chronology + * if the {@code era} is not of the correct type for the chronology */ def dateYearDay(era: Era, yearOfEra: Int, dayOfYear: Int): ChronoLocalDate = dateYearDay(prolepticYear(era, yearOfEra), dayOfYear) @@ -681,7 +681,7 @@ trait Chronology extends Ordered[Chronology] { * @throws DateTimeException * if unable to convert * @throws ClassCastException - * if the { @code era} is not of the correct type for the chronology + * if the {@code era} is not of the correct type for the chronology */ def prolepticYear(era: Era, yearOfEra: Int): Int diff --git a/core/shared/src/main/scala/org/threeten/bp/chrono/HijrahDate.scala b/core/shared/src/main/scala/org/threeten/bp/chrono/HijrahDate.scala index 5a882f5bd..af3e918d5 100644 --- a/core/shared/src/main/scala/org/threeten/bp/chrono/HijrahDate.scala +++ b/core/shared/src/main/scala/org/threeten/bp/chrono/HijrahDate.scala @@ -89,9 +89,9 @@ object HijrahDate { Array(30, 29, 30, 29, 30, 29, 30, 29, 30, 29, 30, 30) /** - *
 Greatest Least Field name Minimum Minimum Maximum Maximum
-   * ---------- ------- ------- ------- ------- ERA 0 0 1 1 YEAR_OF_ERA 1 1 9999 9999 MONTH_OF_YEAR
-   * 1 1 12 12 DAY_OF_MONTH 1 1 29 30 DAY_OF_YEAR 1 1 354 355 
+ *
 Greatest Least Field name Minimum Minimum Maximum Maximum ---------- ------- -------
+   * ------- ------- ERA 0 0 1 1 YEAR_OF_ERA 1 1 9999 9999 MONTH_OF_YEAR 1 1 12 12 DAY_OF_MONTH 1 1
+   * 29 30 DAY_OF_YEAR 1 1 354 355 
* * Minimum values. */ @@ -420,7 +420,7 @@ object HijrahDate { * @return * the date in Hijrah calendar system, not null * @throws DateTimeException - * if unable to convert to a { @code HijrahDate} + * if unable to convert to a {@code HijrahDate} */ def from(temporal: TemporalAccessor): HijrahDate = HijrahChronology.INSTANCE.date(temporal) diff --git a/core/shared/src/main/scala/org/threeten/bp/chrono/MinguoDate.scala b/core/shared/src/main/scala/org/threeten/bp/chrono/MinguoDate.scala index b986b4538..5f6560178 100644 --- a/core/shared/src/main/scala/org/threeten/bp/chrono/MinguoDate.scala +++ b/core/shared/src/main/scala/org/threeten/bp/chrono/MinguoDate.scala @@ -138,7 +138,7 @@ object MinguoDate { * @return * the date in Minguo calendar system, not null * @throws DateTimeException - * if unable to convert to a { @code MinguoDate} + * if unable to convert to a {@code MinguoDate} */ def from(temporal: TemporalAccessor): MinguoDate = MinguoChronology.INSTANCE.date(temporal) diff --git a/core/shared/src/main/scala/org/threeten/bp/chrono/ThaiBuddhistDate.scala b/core/shared/src/main/scala/org/threeten/bp/chrono/ThaiBuddhistDate.scala index cdc167df6..a3843ab61 100644 --- a/core/shared/src/main/scala/org/threeten/bp/chrono/ThaiBuddhistDate.scala +++ b/core/shared/src/main/scala/org/threeten/bp/chrono/ThaiBuddhistDate.scala @@ -138,7 +138,7 @@ object ThaiBuddhistDate { * @return * the date in Thai Buddhist calendar system, not null * @throws DateTimeException - * if unable to convert to a { @code ThaiBuddhistDate} + * if unable to convert to a {@code ThaiBuddhistDate} */ def from(temporal: TemporalAccessor): ThaiBuddhistDate = ThaiBuddhistChronology.INSTANCE.date(temporal) diff --git a/core/shared/src/main/scala/org/threeten/bp/chrono/package.scala b/core/shared/src/main/scala/org/threeten/bp/chrono/package.scala index e891fabde..d45968822 100644 --- a/core/shared/src/main/scala/org/threeten/bp/chrono/package.scala +++ b/core/shared/src/main/scala/org/threeten/bp/chrono/package.scala @@ -39,10 +39,10 @@ package org.threeten.bp * * The supported calendar systems includes: * - * -{@linkplain org.threeten.bp.chrono.HijrahChronology Hijrah calendar} - * -{@linkplain org.threeten.bp.chrono.JapaneseChronology Japanese calendar} - * -{@linkplain org.threeten.bp.chrono.MinguoChronology Minguo calendar} - * -{@linkplain org.threeten.bp.chrono.ThaiBuddhistChronology Thai Buddhist calendar} + * -{@linkplain org.threeten.bp.chrono.HijrahChronology Hijrah calendar} -{@linkplain + * org.threeten.bp.chrono.JapaneseChronology Japanese calendar} -{@linkplain + * org.threeten.bp.chrono.MinguoChronology Minguo calendar} -{@linkplain + * org.threeten.bp.chrono.ThaiBuddhistChronology Thai Buddhist calendar} * * It is intended that applications use the main API whenever possible, including code to read and * write from a persistent data store, such as a database, and to send dates and times across a diff --git a/core/shared/src/main/scala/org/threeten/bp/format/DateTimeBuilder.scala b/core/shared/src/main/scala/org/threeten/bp/format/DateTimeBuilder.scala index d32e08bc1..2804aa66b 100644 --- a/core/shared/src/main/scala/org/threeten/bp/format/DateTimeBuilder.scala +++ b/core/shared/src/main/scala/org/threeten/bp/format/DateTimeBuilder.scala @@ -134,7 +134,7 @@ final class DateTimeBuilder() extends TemporalAccessor with Cloneable { * @param value * the value to add, not null * @return - * { @code this}, for method chaining + * {@code this}, for method chaining * @throws DateTimeException * if the field is already present with a different value */ @@ -166,7 +166,7 @@ final class DateTimeBuilder() extends TemporalAccessor with Cloneable { * @param resolverStyle * how to resolve * @return - * { @code this}, for method chaining + * {@code this}, for method chaining */ def resolve( resolverStyle: ResolverStyle, @@ -295,14 +295,16 @@ final class DateTimeBuilder() extends TemporalAccessor with Cloneable { if (fieldValues.containsKey(CLOCK_HOUR_OF_DAY)) { val ch: Long = fieldValues.remove(CLOCK_HOUR_OF_DAY) if (resolverStyle ne ResolverStyle.LENIENT) - if ((resolverStyle eq ResolverStyle.SMART) && ch == 0) {} else + if ((resolverStyle eq ResolverStyle.SMART) && ch == 0) {} + else CLOCK_HOUR_OF_DAY.checkValidValue(ch) addFieldValue(HOUR_OF_DAY, if (ch == 24) 0 else ch) } if (fieldValues.containsKey(CLOCK_HOUR_OF_AMPM)) { val ch: Long = fieldValues.remove(CLOCK_HOUR_OF_AMPM) if (resolverStyle ne ResolverStyle.LENIENT) - if ((resolverStyle eq ResolverStyle.SMART) && ch == 0) {} else + if ((resolverStyle eq ResolverStyle.SMART) && ch == 0) {} + else CLOCK_HOUR_OF_AMPM.checkValidValue(ch) addFieldValue(HOUR_OF_AMPM, if (ch == 12) 0 else ch) } @@ -554,7 +556,7 @@ final class DateTimeBuilder() extends TemporalAccessor with Cloneable { * @tparam R * the type to return * @param type - * the type to invoke { @code from} on, not null + * the type to invoke {@code from} on, not null * @return * the extracted value, not null * @throws DateTimeException diff --git a/core/shared/src/main/scala/org/threeten/bp/format/DateTimeFormatter.scala b/core/shared/src/main/scala/org/threeten/bp/format/DateTimeFormatter.scala index b3ddb6f53..33ec21d82 100644 --- a/core/shared/src/main/scala/org/threeten/bp/format/DateTimeFormatter.scala +++ b/core/shared/src/main/scala/org/threeten/bp/format/DateTimeFormatter.scala @@ -440,10 +440,9 @@ object DateTimeFormatter { * DateTimeFormatter#withLocale(Locale)}. * * All letters 'A' to 'Z' and 'a' to 'z' are reserved as pattern letters. The following pattern - * letters are defined:
 Symbol Meaning Presentation Examples
-   * ------ ------- ------------ ------- G era number/text 1; 01; AD; Anno Domini y year year 2004;
-   * 04 D day-of-year number 189 M month-of-year number/text 7; 07; Jul; July; J d day-of-month
-   * number 10
+   * letters are defined: 
 Symbol Meaning Presentation Examples ------ ------- ------------
+   * ------- G era number/text 1; 01; AD; Anno Domini y year year 2004; 04 D day-of-year number 189
+   * M month-of-year number/text 7; 07; Jul; July; J d day-of-month number 10
    *
    * Q quarter-of-year number/text 3; 03; Q3 Y week-based-year year 1996; 96 w week-of-year number
    * 27 W week-of-month number 27 e localized day-of-week number 2; Tue; Tuesday; T E day-of-week
@@ -820,7 +819,7 @@ object DateTimeFormatter {
           return builder
         builder.build(query)
       } catch {
-        case _: RuntimeException          =>
+        case _: RuntimeException =>
           pos.setErrorIndex(0)
           null
       }
@@ -1392,7 +1391,7 @@ final class DateTimeFormatter private[format] (
    * @param text
    *   the text to parse, not null
    * @param types
-   *   the types to attempt to parse to, which must implement { @code TemporalAccessor}, not null
+   *   the types to attempt to parse to, which must implement {@code TemporalAccessor}, not null
    * @return
    *   the parsed date-time, not null
    * @throws IllegalArgumentException
diff --git a/core/shared/src/main/scala/org/threeten/bp/format/DateTimeFormatterBuilder.scala b/core/shared/src/main/scala/org/threeten/bp/format/DateTimeFormatterBuilder.scala
index b5066dfe9..52288033c 100644
--- a/core/shared/src/main/scala/org/threeten/bp/format/DateTimeFormatterBuilder.scala
+++ b/core/shared/src/main/scala/org/threeten/bp/format/DateTimeFormatterBuilder.scala
@@ -915,7 +915,7 @@ final class DateTimeFormatterBuilder private (
    * @return
    *   this, for chaining, not null
    * @throws IllegalArgumentException
-   *   if style is neither { @link TextStyle#FULL full} nor { @link TextStyle#SHORT short}
+   *   if style is neither {@link TextStyle#FULL full} nor {@link TextStyle#SHORT short}
    */
   def appendLocalizedOffset(style: TextStyle): DateTimeFormatterBuilder = {
     Objects.requireNonNull(style, "style")
@@ -1235,10 +1235,9 @@ final class DateTimeFormatterBuilder private (
    *
    * All letters 'A' to 'Z' and 'a' to 'z' are reserved as pattern letters. The characters '{' and
    * '}' are reserved for future use. The characters '[' and ']' indicate optional patterns. The
-   * following pattern letters are defined: 
 Symbol Meaning Presentation Examples
-   * ------ ------- ------------ ------- G era number/text 1; 01; AD; Anno Domini y year year 2004;
-   * 04 D day-of-year number 189 M month-of-year number/text 7; 07; Jul; July; J d day-of-month
-   * number 10
+   * following pattern letters are defined: 
 Symbol Meaning Presentation Examples ------
+   * ------- ------------ ------- G era number/text 1; 01; AD; Anno Domini y year year 2004; 04 D
+   * day-of-year number 189 M month-of-year number/text 7; 07; Jul; July; J d day-of-month number 10
    *
    * Q quarter-of-year number/text 3; 03; Q3 Y week-based-year year 1996; 96 w week-of-year number
    * 27 W week-of-month number 27 e localized day-of-week number 2; Tue; Tuesday; T E day-of-week
@@ -1705,7 +1704,7 @@ final class DateTimeFormatterBuilder private (
    * @return
    *   this, for chaining, not null
    * @throws IllegalStateException
-   *   if there was no previous call to { @code optionalStart}
+   *   if there was no previous call to {@code optionalStart}
    */
   def optionalEnd(): DateTimeFormatterBuilder = {
     if (active.parent == null)
diff --git a/core/shared/src/main/scala/org/threeten/bp/temporal/TemporalAccessor.scala b/core/shared/src/main/scala/org/threeten/bp/temporal/TemporalAccessor.scala
index 5d3791093..ec73cb8b5 100644
--- a/core/shared/src/main/scala/org/threeten/bp/temporal/TemporalAccessor.scala
+++ b/core/shared/src/main/scala/org/threeten/bp/temporal/TemporalAccessor.scala
@@ -146,7 +146,7 @@ trait TemporalAccessor {
    * @throws DateTimeException
    *   if a value for the field cannot be obtained
    * @throws DateTimeException
-   *   if the range of valid values for the field exceeds an { @code int}
+   *   if the range of valid values for the field exceeds an {@code int}
    * @throws DateTimeException
    *   if the value is outside the range of valid values for the field
    * @throws ArithmeticException
diff --git a/core/shared/src/main/scala/org/threeten/bp/temporal/ValueRange.scala b/core/shared/src/main/scala/org/threeten/bp/temporal/ValueRange.scala
index 826ee97c1..b2e3951aa 100644
--- a/core/shared/src/main/scala/org/threeten/bp/temporal/ValueRange.scala
+++ b/core/shared/src/main/scala/org/threeten/bp/temporal/ValueRange.scala
@@ -210,7 +210,7 @@ final class ValueRange private (
    * This implementation uses {@link #getMinimum()} and {@link #getMaximum()}.
    *
    * @return
-   *   true if a valid value always fits in an { @code int}
+   *   true if a valid value always fits in an {@code int}
    */
   def isIntValue: Boolean = getMinimum >= Int.MinValue && getMaximum <= Int.MaxValue
 
@@ -235,7 +235,7 @@ final class ValueRange private (
    * @param value
    *   the value to check
    * @return
-   *   true if the value is valid and fits in an { @code int}
+   *   true if the value is valid and fits in an {@code int}
    */
   def isValidIntValue(value: Long): Boolean = isIntValue && isValidValue(value)
 
diff --git a/core/shared/src/main/scala/org/threeten/bp/temporal/WeekFields.scala b/core/shared/src/main/scala/org/threeten/bp/temporal/WeekFields.scala
index 4d9c4acb1..f72e1aef3 100644
--- a/core/shared/src/main/scala/org/threeten/bp/temporal/WeekFields.scala
+++ b/core/shared/src/main/scala/org/threeten/bp/temporal/WeekFields.scala
@@ -327,7 +327,7 @@ object WeekFields {
      * Returns the week number computed from the reference day and reference dayOfWeek.
      *
      * @param offset
-     *   the offset to align a date with the start of week from { @link #startOfWeekOffset}.
+     *   the offset to align a date with the start of week from {@link #startOfWeekOffset}.
      * @param day
      *   the day for which to compute the week number
      * @return
diff --git a/core/shared/src/main/scala/org/threeten/bp/zone/ZoneOffsetTransition.scala b/core/shared/src/main/scala/org/threeten/bp/zone/ZoneOffsetTransition.scala
index 0db7ee578..c9c4f9dac 100644
--- a/core/shared/src/main/scala/org/threeten/bp/zone/ZoneOffsetTransition.scala
+++ b/core/shared/src/main/scala/org/threeten/bp/zone/ZoneOffsetTransition.scala
@@ -73,7 +73,7 @@ object ZoneOffsetTransition {
    * @return
    *   the transition, not null
    * @throws IllegalArgumentException
-   *   if { @code offsetBefore} and { @code offsetAfter} are equal, or { @code transition.getNano()}
+   *   if {@code offsetBefore} and {@code offsetAfter} are equal, or {@code transition.getNano()}
    *   returns non-zero value
    */
   def of(
diff --git a/core/shared/src/main/scala/org/threeten/bp/zone/ZoneRulesBuilder.scala b/core/shared/src/main/scala/org/threeten/bp/zone/ZoneRulesBuilder.scala
index 91cbd3db2..3235200d7 100644
--- a/core/shared/src/main/scala/org/threeten/bp/zone/ZoneRulesBuilder.scala
+++ b/core/shared/src/main/scala/org/threeten/bp/zone/ZoneRulesBuilder.scala
@@ -553,7 +553,7 @@ class ZoneRulesBuilder() {
      *   the month of the transition, not null
      * @param dayOfMonthIndicator
      *   the day-of-month of the transition, adjusted by dayOfWeek, from 1 to 31 adjusted later, or
-     * -1 to -28 adjusted earlier from the last day of the month
+     *   -1 to -28 adjusted earlier from the last day of the month
      * @param dayOfWeek
      *   the day-of-week to adjust to, null if day-of-month should not be adjusted
      * @param time
diff --git a/core/shared/src/main/scala/org/threeten/bp/zone/ZoneRulesProvider.scala b/core/shared/src/main/scala/org/threeten/bp/zone/ZoneRulesProvider.scala
index 5aca943c8..d755b5bcb 100644
--- a/core/shared/src/main/scala/org/threeten/bp/zone/ZoneRulesProvider.scala
+++ b/core/shared/src/main/scala/org/threeten/bp/zone/ZoneRulesProvider.scala
@@ -70,14 +70,14 @@ object ZoneRulesProvider {
    * caching would not be desirable, see {@link #provideRules}.
    *
    * @param zoneId
-   *   the zone ID as defined by { @code ZoneId}, not null
+   *   the zone ID as defined by {@code ZoneId}, not null
    * @param forCaching
    *   whether the rules are being queried for caching, true if the returned rules will be cached by
-   *   { @code ZoneId}, false if they will be returned to the user without being cached in { @code
+   *   {@code ZoneId}, false if they will be returned to the user without being cached in { @code
    *   ZoneId}
    * @return
-   *   the rules, null if { @code forCaching} is true and this is a dynamic provider that wants to
-   *   prevent caching in { @code ZoneId}, otherwise not null
+   *   the rules, null if {@code forCaching} is true and this is a dynamic provider that wants to
+   *   prevent caching in {@code ZoneId}, otherwise not null
    * @throws ZoneRulesException
    *   if rules cannot be obtained for the zone ID
    */
@@ -103,7 +103,7 @@ object ZoneRulesProvider {
    * more than one element if historical rule information is available.
    *
    * @param zoneId
-   *   the zone region ID as used by { @code ZoneId}, not null
+   *   the zone region ID as used by {@code ZoneId}, not null
    * @return
    *   a modifiable copy of the history of the rules for the ID, sorted from oldest to newest, not
    *   null
@@ -119,7 +119,7 @@ object ZoneRulesProvider {
    * Gets the provider for the zone ID.
    *
    * @param zoneId
-   *   the zone region ID as used by { @code ZoneId}, not null
+   *   the zone region ID as used by {@code ZoneId}, not null
    * @return
    *   the provider, not null
    * @throws ZoneRulesException
@@ -281,7 +281,7 @@ abstract class ZoneRulesProvider protected () {
    * provider may increase the set of versions as more data becomes available.
    *
    * @param zoneId
-   *   the zone region ID as used by { @code ZoneId}, not null
+   *   the zone region ID as used by {@code ZoneId}, not null
    * @return
    *   a modifiable copy of the history of the rules for the ID, sorted from oldest to newest, not
    *   null
diff --git a/tests/jvm/src/test/scala/org/threeten/bp/ClassLoaderChecker.scala b/tests/jvm/src/test/scala/org/threeten/bp/ClassLoaderChecker.scala
index 24f052ee4..cf244830e 100644
--- a/tests/jvm/src/test/scala/org/threeten/bp/ClassLoaderChecker.scala
+++ b/tests/jvm/src/test/scala/org/threeten/bp/ClassLoaderChecker.scala
@@ -47,7 +47,7 @@ import org.threeten.bp.temporal.TemporalAccessor
  */
 object ClassLoaderChecker {
   def main(args: Array[String]): Unit = {
-    var a: Any = new ConcurrentHashMap[AnyRef, AnyRef]
+    var a: Any             = new ConcurrentHashMap[AnyRef, AnyRef]
     a.toString
     a = new ReentrantLock
     a.toString
diff --git a/tests/shared/src/test/scala-2/org/threeten/bp/temporal/MockFieldNoValue.scala b/tests/shared/src/test/scala-2/org/threeten/bp/temporal/MockFieldNoValue.scala
index e1739cabb..204f7875c 100644
--- a/tests/shared/src/test/scala-2/org/threeten/bp/temporal/MockFieldNoValue.scala
+++ b/tests/shared/src/test/scala-2/org/threeten/bp/temporal/MockFieldNoValue.scala
@@ -45,18 +45,18 @@ object MockFieldNoValue {
 final class MockFieldNoValue(name: String, ordinal: Int)
     extends Enum[MockFieldNoValue](name, ordinal)
     with TemporalField {
-  override def toString: String  = null
-  def getBaseUnit: TemporalUnit  = WEEKS
-  def getRangeUnit: TemporalUnit = MONTHS
-  def range: ValueRange          = ValueRange.of(1, 20)
-  def isDateBased: Boolean       = true
-  def isTimeBased: Boolean       = false
-  def isSupportedBy(dateTime:  TemporalAccessor): Boolean    = true
-  def rangeRefinedBy(dateTime: TemporalAccessor): ValueRange = ValueRange.of(1, 20)
-  def getFrom(dateTime:        TemporalAccessor): Long       = throw new DateTimeException("Mock")
-  def adjustInto[R <: Temporal](dateTime: R, newValue: Long): R =
+  override def toString: String                                        = null
+  def getBaseUnit: TemporalUnit                                        = WEEKS
+  def getRangeUnit: TemporalUnit                                       = MONTHS
+  def range: ValueRange                                                = ValueRange.of(1, 20)
+  def isDateBased: Boolean                                             = true
+  def isTimeBased: Boolean                                             = false
+  def isSupportedBy(dateTime:         TemporalAccessor): Boolean       = true
+  def rangeRefinedBy(dateTime:        TemporalAccessor): ValueRange    = ValueRange.of(1, 20)
+  def getFrom(dateTime:               TemporalAccessor): Long          = throw new DateTimeException("Mock")
+  def adjustInto[R <: Temporal](dateTime: R, newValue: Long): R        =
     throw new DateTimeException("Mock")
-  override def getDisplayName(locale: Locale): String = "Mock"
+  override def getDisplayName(locale: Locale): String                  = "Mock"
   override def resolve(
     fieldValues:     java.util.Map[TemporalField, java.lang.Long],
     partialTemporal: TemporalAccessor,
diff --git a/tests/shared/src/test/scala-3/org/threeten/bp/temporal/MockFieldNoValue.scala b/tests/shared/src/test/scala-3/org/threeten/bp/temporal/MockFieldNoValue.scala
index 47b01e282..44c9e13c2 100644
--- a/tests/shared/src/test/scala-3/org/threeten/bp/temporal/MockFieldNoValue.scala
+++ b/tests/shared/src/test/scala-3/org/threeten/bp/temporal/MockFieldNoValue.scala
@@ -42,18 +42,18 @@ enum MockFieldNoValue private (name: String, ordinal: Int)
     extends Enum[MockFieldNoValue]
     with TemporalField {
   case INSTANCE extends MockFieldNoValue("INSTANCE", 0)
-  override def toString: String  = null
-  def getBaseUnit: TemporalUnit  = WEEKS
-  def getRangeUnit: TemporalUnit = MONTHS
-  def range: ValueRange          = ValueRange.of(1, 20)
-  def isDateBased: Boolean       = true
-  def isTimeBased: Boolean       = false
-  def isSupportedBy(dateTime:  TemporalAccessor): Boolean    = true
-  def rangeRefinedBy(dateTime: TemporalAccessor): ValueRange = ValueRange.of(1, 20)
-  def getFrom(dateTime:        TemporalAccessor): Long       = throw new DateTimeException("Mock")
-  def adjustInto[R <: Temporal](dateTime: R, newValue: Long): R =
+  override def toString: String                                        = null
+  def getBaseUnit: TemporalUnit                                        = WEEKS
+  def getRangeUnit: TemporalUnit                                       = MONTHS
+  def range: ValueRange                                                = ValueRange.of(1, 20)
+  def isDateBased: Boolean                                             = true
+  def isTimeBased: Boolean                                             = false
+  def isSupportedBy(dateTime:         TemporalAccessor): Boolean       = true
+  def rangeRefinedBy(dateTime:        TemporalAccessor): ValueRange    = ValueRange.of(1, 20)
+  def getFrom(dateTime:               TemporalAccessor): Long          = throw new DateTimeException("Mock")
+  def adjustInto[R <: Temporal](dateTime: R, newValue: Long): R        =
     throw new DateTimeException("Mock")
-  override def getDisplayName(locale: Locale): String = "Mock"
+  override def getDisplayName(locale: Locale): String                  = "Mock"
   override def resolve(
     fieldValues:     java.util.Map[TemporalField, java.lang.Long],
     partialTemporal: TemporalAccessor,
diff --git a/tests/shared/src/test/scala/org/threeten/bp/AssertionsHelper.scala b/tests/shared/src/test/scala/org/threeten/bp/AssertionsHelper.scala
index 2961d4963..0b62baf4e 100644
--- a/tests/shared/src/test/scala/org/threeten/bp/AssertionsHelper.scala
+++ b/tests/shared/src/test/scala/org/threeten/bp/AssertionsHelper.scala
@@ -17,27 +17,27 @@ trait AssertionsHelper { this: AnyFunSuite =>
       true
 
   def assertEquals[A, B](
-    o1:                  A,
-    o2:                  B,
-    msg:                 String
+    o1:  A,
+    o2:  B,
+    msg: String
   )(implicit prettifier: Prettifier, pos: source.Position): Assertion =
     assert(o1 == o2, msg)
 
   def assertEquals[A, B](
-    o1:                  A,
-    o2:                  B
+    o1: A,
+    o2: B
   )(implicit prettifier: Prettifier, pos: source.Position): Assertion =
     assert(o1 == o2)
 
   def assertSame[A <: AnyRef, B <: AnyRef](
-    o1:                  A,
-    o2:                  B
+    o1: A,
+    o2: B
   )(implicit prettifier: Prettifier, pos: source.Position): Assertion =
     assert(o1 eq o2)
 
   def assertNotEquals[A, B](
-    o1:                  A,
-    o2:                  B
+    o1: A,
+    o2: B
   )(implicit prettifier: Prettifier, pos: source.Position): Assertion =
     assert(o1 != o2)
 
@@ -51,8 +51,8 @@ trait AssertionsHelper { this: AnyFunSuite =>
     assert(a == null)
 
   def assertNotNull[A](
-    a:                   A,
-    msg:                 String
+    a:   A,
+    msg: String
   )(implicit prettifier: Prettifier, pos: source.Position): Assertion =
     assert(a != null, msg)
 
diff --git a/tests/shared/src/test/scala/org/threeten/bp/MockSimplePeriod.scala b/tests/shared/src/test/scala/org/threeten/bp/MockSimplePeriod.scala
index fb35fbcfe..1bef84223 100644
--- a/tests/shared/src/test/scala/org/threeten/bp/MockSimplePeriod.scala
+++ b/tests/shared/src/test/scala/org/threeten/bp/MockSimplePeriod.scala
@@ -54,9 +54,9 @@ object MockSimplePeriod {
    * @param unit
    *   the unit that the period is measured in, must not be the 'Forever' unit, not null
    * @return
-   *   the { @code MockSimplePeriod} instance, not null
+   *   the {@code MockSimplePeriod} instance, not null
    * @throws DateTimeException
-   *   if the period unit is { @link org.threeten.bp.temporal.ChronoUnit#FOREVER}.
+   *   if the period unit is {@link org.threeten.bp.temporal.ChronoUnit#FOREVER}.
    */
   def of(amount: Long, unit: TemporalUnit): MockSimplePeriod = new MockSimplePeriod(amount, unit)
 }
diff --git a/tests/shared/src/test/scala/org/threeten/bp/Performance.scala b/tests/shared/src/test/scala/org/threeten/bp/Performance.scala
index ee96eab01..1cfabd023 100644
--- a/tests/shared/src/test/scala/org/threeten/bp/Performance.scala
+++ b/tests/shared/src/test/scala/org/threeten/bp/Performance.scala
@@ -182,7 +182,7 @@ object Performance {
       total += dt.getMinute
       total += dt.getSecond
     }
-    val end: Long = System.nanoTime
+    val end: Long   = System.nanoTime
     System.out.println("LocalDT:   Query:  " + NF.format(end - start) + " ns" + " " + total)
     result("LocalDT-Q", end - start)
   }
@@ -195,7 +195,7 @@ object Performance {
       buf.setLength(0)
       buf.append(format.format(dt))
     }
-    val end: Long = System.nanoTime
+    val end: Long                 = System.nanoTime
     System.out.println("LocalDT:   Format: " + NF.format(end - start) + " ns" + " " + buf)
     result("LocalDT-P", end - start)
   }
@@ -210,7 +210,7 @@ object Performance {
       total += dt.get(HOUR_OF_DAY)
       total += dt.get(MINUTE_OF_HOUR)
     }
-    val end: Long = System.nanoTime
+    val end: Long   = System.nanoTime
     System.out.println("LocalDT:   Derive: " + NF.format(end - start) + " ns" + " " + total)
     result("LocalDT-V", end - start)
   }
@@ -248,7 +248,7 @@ object Performance {
       total += dt.getMonth.getValue
       total += dt.getDayOfMonth
     }
-    val end: Long = System.nanoTime
+    val end: Long   = System.nanoTime
     System.out.println("LocalD:    Query:  " + NF.format(end - start) + " ns" + " " + total)
     result("LocalD-Q", end - start)
   }
@@ -261,7 +261,7 @@ object Performance {
       buf.setLength(0)
       buf.append(format.format(dt))
     }
-    val end: Long = System.nanoTime
+    val end: Long                 = System.nanoTime
     System.out.println("LocalD:    Format: " + NF.format(end - start) + " ns" + " " + buf)
     result("LocalD-P", end - start)
   }
@@ -303,7 +303,7 @@ object Performance {
       total += dt.getSecond
       total += dt.getNano
     }
-    val end: Long = System.nanoTime
+    val end: Long   = System.nanoTime
     System.out.println("LocalT:    Query:  " + NF.format(end - start) + " ns" + " " + total)
     result("LocalT-Q", end - start)
   }
@@ -316,7 +316,7 @@ object Performance {
       buf.setLength(0)
       buf.append(format.format(dt))
     }
-    val end: Long = System.nanoTime
+    val end: Long                 = System.nanoTime
     System.out.println("LocalT:    Format: " + NF.format(end - start) + " ns" + " " + buf)
     result("LocalT-P", end - start)
   }
@@ -330,7 +330,7 @@ object Performance {
       total += dt.get(SECOND_OF_MINUTE)
       total += dt.get(NANO_OF_SECOND)
     }
-    val end: Long = System.nanoTime
+    val end: Long   = System.nanoTime
     System.out.println("LocalT:    Derive: " + NF.format(end - start) + " ns" + " " + total)
     result("LocalT-V", end - start)
   }
@@ -380,7 +380,7 @@ object Performance {
       total += dt.getMinute
       total += dt.getSecond
     }
-    val end: Long = System.nanoTime
+    val end: Long   = System.nanoTime
     System.out.println("ZonedDT:   Query:  " + NF.format(end - start) + " ns" + " " + total)
     result("ZonedDT-Q", end - start)
   }
@@ -393,7 +393,7 @@ object Performance {
       buf.setLength(0)
       buf.append(format.format(dt))
     }
-    val end: Long = System.nanoTime
+    val end: Long                 = System.nanoTime
     System.out.println("ZonedDT:   Format: " + NF.format(end - start) + " ns" + " " + buf)
     result("ZonedDT-P", end - start)
   }
@@ -429,7 +429,7 @@ object Performance {
       total += dt.getEpochSecond
       total += dt.getNano
     }
-    val end: Long = System.nanoTime
+    val end: Long   = System.nanoTime
     System.out.println("Instant:   Query:  " + NF.format(end - start) + " ns" + " " + total)
     result("Instant-Q", end - start)
   }
@@ -441,7 +441,7 @@ object Performance {
       buf.setLength(0)
       buf.append(dt.toString)
     }
-    val end: Long = System.nanoTime
+    val end: Long          = System.nanoTime
     System.out.println("Instant:   Format: " + NF.format(end - start) + " ns" + " " + buf)
     result("Instant-P", end - start)
   }
@@ -475,7 +475,7 @@ object Performance {
     val start: Long = System.nanoTime
     for (dt <- list.asScala)
       total += dt.getTime
-    val end: Long = System.nanoTime
+    val end: Long   = System.nanoTime
     System.out.println("Date:      Query:  " + NF.format(end - start) + " ns" + " " + total)
     result("JUDate-Q", end - start)
   }
@@ -487,7 +487,7 @@ object Performance {
       buf.setLength(0)
       buf.append(dt.toString)
     }
-    val end: Long = System.nanoTime
+    val end: Long          = System.nanoTime
     System.out.println("Date:      Format: " + NF.format(end - start) + " ns" + " " + buf)
     result("JUDate-P", end - start)
   }
@@ -537,7 +537,7 @@ object Performance {
       total += gcal.get(Calendar.SECOND)
       total += gcal.get(Calendar.SECOND)
     }
-    val end: Long = System.nanoTime
+    val end: Long   = System.nanoTime
     System.out.println("GCalendar: Query:  " + NF.format(end - start) + " ns" + " " + total)
     result("GregCal-Q", end - start)
   }
@@ -550,7 +550,7 @@ object Performance {
       buf.setLength(0)
       buf.append(format.format(gcal.getTime))
     }
-    val end: Long = System.nanoTime
+    val end: Long                = System.nanoTime
     System.out.println("GCalendar: Format: " + NF.format(end - start) + " ns" + " " + buf)
     result("GregCal-P", end - start)
   }
diff --git a/tests/shared/src/test/scala/org/threeten/bp/TestInstant.scala b/tests/shared/src/test/scala/org/threeten/bp/TestInstant.scala
index b263dbb18..f7ba88da0 100644
--- a/tests/shared/src/test/scala/org/threeten/bp/TestInstant.scala
+++ b/tests/shared/src/test/scala/org/threeten/bp/TestInstant.scala
@@ -244,27 +244,27 @@ class TestInstant
       List[Long](Long.MaxValue - 1,
                  0,
                  (Long.MaxValue - 1) / 1000,
-                 ((Long.MaxValue - 1) % 1000).toInt * 1000000
+                 ((Long.MaxValue - 1)                                   % 1000).toInt * 1000000
       ),
       List[Long](Long.MinValue,
                  0,
                  (Long.MinValue / 1000) - 1,
-                 (Long.MinValue % 1000).toInt * 1000000 + 1000000000
+                 (Long.MinValue                                         % 1000).toInt * 1000000 + 1000000000
       ),
       List[Long](Long.MinValue,
                  1,
                  (Long.MinValue / 1000) - 1,
-                 (Long.MinValue % 1000).toInt * 1000000 + 1000000000 + 1
+                 (Long.MinValue                                         % 1000).toInt * 1000000 + 1000000000 + 1
       ),
       List[Long](Long.MinValue + 1,
                  0,
                  ((Long.MinValue + 1) / 1000) - 1,
-                 ((Long.MinValue + 1) % 1000).toInt * 1000000 + 1000000000
+                 ((Long.MinValue + 1)                                   % 1000).toInt * 1000000 + 1000000000
       ),
       List[Long](Long.MinValue + 1,
                  1,
                  ((Long.MinValue + 1) / 1000) - 1,
-                 ((Long.MinValue + 1) % 1000).toInt * 1000000 + 1000000000 + 1
+                 ((Long.MinValue + 1)                                   % 1000).toInt * 1000000 + 1000000000 + 1
       )
     )
 
@@ -730,7 +730,7 @@ class TestInstant
            0,
            Long.MinValue,
            Long.MinValue / 1000 - 1,
-           (Long.MinValue % 1000).toInt * 1000000 + 1000000000
+           (Long.MinValue                                            % 1000).toInt * 1000000 + 1000000000
       )
     )
 
diff --git a/tests/shared/src/test/scala/org/threeten/bp/TestLocalDateTime.scala b/tests/shared/src/test/scala/org/threeten/bp/TestLocalDateTime.scala
index 94890e088..a048e172f 100644
--- a/tests/shared/src/test/scala/org/threeten/bp/TestLocalDateTime.scala
+++ b/tests/shared/src/test/scala/org/threeten/bp/TestLocalDateTime.scala
@@ -1632,7 +1632,7 @@ class TestLocalDateTime
       while (i < 50) {
         {
           t = t.plusHours(1)
-          if ((i + 1)                     % 24 == 0)
+          if ((i + 1) % 24 == 0)
             d = d.plusDays(1)
           assertEquals(t.toLocalDate, d)
           assertEquals(t.getHour, (i + 1) % 24)
@@ -2308,7 +2308,7 @@ class TestLocalDateTime
       while (i < 50) {
         {
           t = t.minusHours(1)
-          if (i                               % 24 == 0)
+          if (i % 24 == 0)
             d = d.minusDays(1)
           assertEquals(t.toLocalDate, d)
           assertEquals(t.getHour, (((-i + 23) % 24) + 24) % 24)
diff --git a/tests/shared/src/test/scala/org/threeten/bp/TestOffsetDateTime_instants.scala b/tests/shared/src/test/scala/org/threeten/bp/TestOffsetDateTime_instants.scala
index c36d59206..c82940c17 100644
--- a/tests/shared/src/test/scala/org/threeten/bp/TestOffsetDateTime_instants.scala
+++ b/tests/shared/src/test/scala/org/threeten/bp/TestOffsetDateTime_instants.scala
@@ -244,7 +244,7 @@ class TestOffsetDateTime_instants extends AnyFunSuite with AssertionsHelper {
             case ex: RuntimeException =>
               System.out.println("RuntimeException: " + i + " " + expected)
               throw ex
-            case ex: Error =>
+            case ex: Error            =>
               System.out.println("Error: " + i + " " + expected)
               throw ex
           }
diff --git a/tests/shared/src/test/scala/org/threeten/bp/chrono/TestChronoLocalDate.scala b/tests/shared/src/test/scala/org/threeten/bp/chrono/TestChronoLocalDate.scala
index 5931c73d7..ccb1b3022 100644
--- a/tests/shared/src/test/scala/org/threeten/bp/chrono/TestChronoLocalDate.scala
+++ b/tests/shared/src/test/scala/org/threeten/bp/chrono/TestChronoLocalDate.scala
@@ -334,7 +334,7 @@ class TestChronoLocalDate extends AnyFunSuite with AssertionsHelper {
           import scala.collection.JavaConverters._
           for (d <- dates.asScala)
             otherDates.add(chrono2.date(d))
-          var i: Int = 0
+          var i: Int                                      = 0
           while (i < dates.size) {
             val a: ChronoLocalDate = dates.get(i)
             var j: Int             = 0
diff --git a/tests/shared/src/test/scala/org/threeten/bp/chrono/TestChronoLocalDateTime.scala b/tests/shared/src/test/scala/org/threeten/bp/chrono/TestChronoLocalDateTime.scala
index 7b6a688c6..d232f1452 100644
--- a/tests/shared/src/test/scala/org/threeten/bp/chrono/TestChronoLocalDateTime.scala
+++ b/tests/shared/src/test/scala/org/threeten/bp/chrono/TestChronoLocalDateTime.scala
@@ -354,7 +354,7 @@ class TestChronoLocalDateTime extends AnyFunSuite with AssertionsHelper {
                 .atTime(d.toLocalTime)
                 .asInstanceOf[ChronoLocalDateTime[_ <: ChronoLocalDate]]
             )
-          var i: Int = 0
+          var i: Int                                                                = 0
           while (i < dates.size) {
             val a: ChronoLocalDateTime[_ <: ChronoLocalDate] = dates.get(i)
             var j: Int                                       = 0
diff --git a/tests/shared/src/test/scala/org/threeten/bp/chrono/TestChronoZonedDateTime.scala b/tests/shared/src/test/scala/org/threeten/bp/chrono/TestChronoZonedDateTime.scala
index 604a56b4d..fcfa837e6 100644
--- a/tests/shared/src/test/scala/org/threeten/bp/chrono/TestChronoZonedDateTime.scala
+++ b/tests/shared/src/test/scala/org/threeten/bp/chrono/TestChronoZonedDateTime.scala
@@ -365,7 +365,7 @@ class TestChronoZonedDateTime extends AnyFunSuite with AssertionsHelper {
               .atZone(d.getZone)
               .asInstanceOf[ChronoZonedDateTime[_ <: ChronoLocalDate]]
           )
-        var i: Int = 0
+        var i: Int                                                                = 0
         while (i < dates.size) {
           val a: ChronoZonedDateTime[_ <: ChronoLocalDate] = dates.get(i)
           var j: Int                                       = 0
diff --git a/tests/shared/src/test/scala/org/threeten/bp/format/GenTestPrinterParser.scala b/tests/shared/src/test/scala/org/threeten/bp/format/GenTestPrinterParser.scala
index fcca0dfab..20a49c119 100644
--- a/tests/shared/src/test/scala/org/threeten/bp/format/GenTestPrinterParser.scala
+++ b/tests/shared/src/test/scala/org/threeten/bp/format/GenTestPrinterParser.scala
@@ -48,9 +48,9 @@ import org.threeten.bp.format.internal.TTBPDateTimePrintContext
 /** Abstract PrinterParser test. */
 object GenTestPrinterParser {
   private val EMPTY: TemporalAccessor = new TemporalAccessor() {
-    def isSupported(field: TemporalField): Boolean = true
-    def getLong(field:     TemporalField): Long    = throw new DateTimeException("Mock")
-    override def get(field: TemporalField): Int =
+    def isSupported(field:       TemporalField): Boolean    = true
+    def getLong(field:           TemporalField): Long       = throw new DateTimeException("Mock")
+    override def get(field: TemporalField): Int             =
       range(field).checkValidIntValue(getLong(field), field)
     override def query[R](query: TemporalQuery[R]): R       = query.queryFrom(this)
     override def range(field:    TemporalField): ValueRange = field.range
diff --git a/tests/shared/src/test/scala/org/threeten/bp/format/TestCharLiteralParser.scala b/tests/shared/src/test/scala/org/threeten/bp/format/TestCharLiteralParser.scala
index 3ca561379..2431fc071 100644
--- a/tests/shared/src/test/scala/org/threeten/bp/format/TestCharLiteralParser.scala
+++ b/tests/shared/src/test/scala/org/threeten/bp/format/TestCharLiteralParser.scala
@@ -78,7 +78,7 @@ class TestCharLiteralParser extends AnyFunSuite with GenTestPrinterParser with A
     data_error.foreach {
       case (pp: CharLiteralPrinterParser) :: (text: String) :: (pos: Int) :: (expected: Class[
             _
-          ]) :: Nil                 =>
+          ]) :: Nil =>
         try pp.parse(parseContext, text, pos)
         catch {
           case ex: RuntimeException =>
diff --git a/tests/shared/src/test/scala/org/threeten/bp/format/TestNumberParser.scala b/tests/shared/src/test/scala/org/threeten/bp/format/TestNumberParser.scala
index 9aeaf847f..c2b09a58b 100644
--- a/tests/shared/src/test/scala/org/threeten/bp/format/TestNumberParser.scala
+++ b/tests/shared/src/test/scala/org/threeten/bp/format/TestNumberParser.scala
@@ -59,7 +59,7 @@ class TestNumberParser extends AnyFunSuite with GenTestPrinterParser with Assert
     data_error.foreach {
       case (pp: TTBPDateTimeFormatterBuilder.NumberPrinterParser) :: (text: String) :: (pos: Int) :: (expected: Class[
             _
-          ]) :: Nil                 =>
+          ]) :: Nil =>
         try pp.parse(parseContext, text, pos)
         catch {
           case ex: RuntimeException =>
diff --git a/tests/shared/src/test/scala/org/threeten/bp/format/TestZoneIdParser.scala b/tests/shared/src/test/scala/org/threeten/bp/format/TestZoneIdParser.scala
index 0562524b0..efa755d0e 100644
--- a/tests/shared/src/test/scala/org/threeten/bp/format/TestZoneIdParser.scala
+++ b/tests/shared/src/test/scala/org/threeten/bp/format/TestZoneIdParser.scala
@@ -65,7 +65,7 @@ class TestZoneIdParser extends AnyFunSuite with GenTestPrinterParser with Assert
     data_error.foreach {
       case (pp: TTBPDateTimeFormatterBuilder.ZoneIdPrinterParser) :: (text: String) :: (pos: Int) :: (_: Class[
             _
-          ]) :: Nil         =>
+          ]) :: Nil =>
         try pp.parse(parseContext, text, pos)
         catch {
           case _: Throwable =>
diff --git a/tests/shared/src/test/scala/org/threeten/bp/zone/TestZoneRulesBuilder.scala b/tests/shared/src/test/scala/org/threeten/bp/zone/TestZoneRulesBuilder.scala
index 29490240a..0ffafb385 100644
--- a/tests/shared/src/test/scala/org/threeten/bp/zone/TestZoneRulesBuilder.scala
+++ b/tests/shared/src/test/scala/org/threeten/bp/zone/TestZoneRulesBuilder.scala
@@ -2234,15 +2234,16 @@ class TestZoneRulesBuilder extends AnyFunSuite with AssertionsHelper {
     assertThrows[NullPointerException] {
       val b: ZoneRulesBuilder = new ZoneRulesBuilder
       b.addWindowForever(TestZoneRulesBuilder.OFFSET_1)
-      b.addRuleToWindow(2000,
-                        Year.MAX_VALUE,
-                        null.asInstanceOf[Month],
-                        31,
-                        SUNDAY,
-                        TestZoneRulesBuilder.time(1, 0),
-                        timeEndOfDay = false,
-                        WALL,
-                        TestZoneRulesBuilder.PERIOD_1HOUR30MIN
+      b.addRuleToWindow(
+        2000,
+        Year.MAX_VALUE,
+        null.asInstanceOf[Month],
+        31,
+        SUNDAY,
+        TestZoneRulesBuilder.time(1, 0),
+        timeEndOfDay = false,
+        WALL,
+        TestZoneRulesBuilder.PERIOD_1HOUR30MIN
       )
     }
   }
diff --git a/tests/shared/src/test/scala/org/threeten/bp/zone/TestZoneRulesProvider.scala b/tests/shared/src/test/scala/org/threeten/bp/zone/TestZoneRulesProvider.scala
index 3281752d1..3934bab8c 100644
--- a/tests/shared/src/test/scala/org/threeten/bp/zone/TestZoneRulesProvider.scala
+++ b/tests/shared/src/test/scala/org/threeten/bp/zone/TestZoneRulesProvider.scala
@@ -61,7 +61,7 @@ object TestZoneRulesProvider {
 
 class TestZoneRulesProvider extends AnyFunSuite with AssertionsHelper {
   test("getAvailableGroupIds") {
-    val zoneIds: java.util.Set[String] = ZoneRulesProvider.getAvailableZoneIds
+    val zoneIds: java.util.Set[String]  = ZoneRulesProvider.getAvailableZoneIds
     assertTrue(zoneIds.contains("Europe/London"))
     try {
       zoneIds.clear()

From 1090964aa212213e608260331474b0ae673732b3 Mon Sep 17 00:00:00 2001
From: Scala Steward 
Date: Fri, 24 Jan 2025 17:38:38 +0000
Subject: [PATCH 3/3] Add 'Reformat with scalafmt 3.8.6' to
 .git-blame-ignore-revs

---
 .git-blame-ignore-revs | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/.git-blame-ignore-revs b/.git-blame-ignore-revs
index f6f1e649e..9c583923f 100644
--- a/.git-blame-ignore-revs
+++ b/.git-blame-ignore-revs
@@ -3,3 +3,6 @@ aa7db3a42121f78a5b3bed3658786c1cef83efe8
 
 # Enable scalafmt for Scala 3
 64df4ae51873593a789af5848bd225c14d0baf8a
+
+# Scala Steward: Reformat with scalafmt 3.8.6
+cc9134f21f040edfe3740184cb2a30d855a776d7