Skip to content

Commit 50f29ce

Browse files
Update scalafmt-core to 3.10.4 (#611)
* Update scalafmt-core to 3.10.4 * Reformat with scalafmt 3.10.4 Executed command: scalafmt --non-interactive * Add 'Reformat with scalafmt 3.10.4' to .git-blame-ignore-revs
1 parent 00872e5 commit 50f29ce

File tree

3 files changed

+9
-7
lines changed

3 files changed

+9
-7
lines changed

.git-blame-ignore-revs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Scala Steward: Reformat with scalafmt 3.10.4
2+
883877c6379365097aaf129bfb37b859ce4a154b

.scalafmt.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
version = 3.10.3
1+
version = 3.10.4
22
runner.dialect = scala36
33
maxColumn = 100
44
align.preset=none

crunchy-protoc-plugin/src/main/scala/eu/neverblink/protoc/java/gen/Preconditions.scala

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -158,24 +158,24 @@ object Preconditions:
158158
/*
159159
* All recent hotspots (as of 2009) *really* like to have the natural code
160160
*
161-
* if (guardExpression) {
161+
* if (guardExpression) {
162162
* throw new BadException(messageExpression);
163163
* }
164164
*
165-
* refactored so that messageExpression is moved to a separate String-returning method.
165+
* refactored so that messageExpression is moved to a separate String-returning method.
166166
*
167-
* if (guardExpression) {
167+
* if (guardExpression) {
168168
* throw new BadException(badMsg(...));
169169
* }
170170
*
171-
* The alternative natural refactorings into void or Exception-returning methods are much slower.
171+
* The alternative natural refactorings into void or Exception-returning methods are much slower.
172172
* This is a big deal - we're talking factors of 2-8 in microbenchmarks, not just 10-20%. (This
173173
* is a hotspot optimizer bug, which should be fixed, but that's a separate, big project).
174174
*
175-
* The coding pattern above is heavily used in java.util, e.g. in ArrayList. There is a
175+
* The coding pattern above is heavily used in java.util, e.g. in ArrayList. There is a
176176
* RangeCheckMicroBenchmark in the JDK that was used to test this.
177177
*
178-
* But the methods in this class want to throw different exceptions, depending on the args, so it
178+
* But the methods in this class want to throw different exceptions, depending on the args, so it
179179
* appears that this pattern is not directly applicable. But we can use the ridiculous, devious
180180
* trick of throwing an exception in the middle of the construction of another exception. Hotspot
181181
* is fine with that.

0 commit comments

Comments
 (0)