Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update scalafmt-core to 3.7.14 #470

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,6 @@ aa7db3a42121f78a5b3bed3658786c1cef83efe8

# Enable scalafmt for Scala 3
64df4ae51873593a789af5848bd225c14d0baf8a

# Scala Steward: Reformat with scalafmt 3.7.14
fd3f4640220f367a343de2e727cb7d5f65dcf070
2 changes: 1 addition & 1 deletion .scalafmt.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version = "3.6.1"
version = "3.7.14"
style = default

maxColumn = 100
Expand Down
2 changes: 1 addition & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,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.2")
.cross(CrossVersion.for3Use2_13)
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,8 @@ 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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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]) =
Expand Down Expand Up @@ -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)
}
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 3 additions & 6 deletions core/shared/src/main/scala/org/threeten/bp/LocalDate.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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.
* <pre> 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 </pre>
* a.isAfter(b) == false a.isAfter(a) == false b.isAfter(a) == true </pre>
*
* 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
Expand All @@ -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. <pre> 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 </pre>
* a.isBefore(b) == true a.isBefore(a) == false b.isBefore(a) == false </pre>
*
* 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
Expand All @@ -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. <pre> 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 </pre>
* a.isEqual(b) == false a.isEqual(a) == true b.isEqual(a) == false </pre>
*
* 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
Expand Down
15 changes: 6 additions & 9 deletions core/shared/src/main/scala/org/threeten/bp/LocalDateTime.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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. <pre> 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 </pre>
* LocalDateTime.of(2012, 7, 1, 12, 00); a.isAfter(b) == false a.isAfter(a) == false b.isAfter(a)
* \== true </pre>
*
* 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
Expand All @@ -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. <pre> 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 </pre>
* LocalDateTime.of(2012, 7, 1, 12, 00); a.isBefore(b) == true a.isBefore(a) == false
* b.isBefore(a) == false </pre>
*
* 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
Expand All @@ -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. <pre> 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 </pre>
* LocalDateTime.of(2012, 7, 1, 12, 00); a.isEqual(b) == false a.isEqual(a) == true b.isEqual(a)
* \== false </pre>
*
* 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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,9 @@ object HijrahDate {
Array(30, 29, 30, 29, 30, 29, 30, 29, 30, 29, 30, 30)

/**
* <pre> 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 </pre>
* <pre> 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 </pre>
*
* Minimum values.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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: <pre> 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: <pre> 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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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: <pre> 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: <pre> 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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
22 changes: 11 additions & 11 deletions tests/shared/src/test/scala/org/threeten/bp/AssertionsHelper.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand All @@ -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)

Expand Down
12 changes: 6 additions & 6 deletions tests/shared/src/test/scala/org/threeten/bp/TestInstant.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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
)
)

Expand Down Expand Up @@ -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
)
)

Expand Down
Loading