Skip to content

Commit

Permalink
Merge pull request #790 from scalameta/update/scalafmt-core-3.7.13
Browse files Browse the repository at this point in the history
Update scalafmt-core to 3.7.13
  • Loading branch information
mergify[bot] authored Sep 1, 2023
2 parents 2939284 + d74cdf3 commit d3c9902
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 2 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Scala Steward: Reformat with scalafmt 3.7.13
f872257dee6eaeb9810d77b3ded0bfd6784cafce
2 changes: 1 addition & 1 deletion .scalafmt.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version = "3.7.11"
version = "3.7.13"
runner.dialect = scala213
maxColumn = 100
project.git = true
Expand Down
6 changes: 3 additions & 3 deletions mdoc/src/main/scala/mdoc/internal/CompatClassloader.scala
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ object CompatClassloader {
.startsWith("jdk.internal.loader.ClassLoaders$")
) {
try {
val unsafeClass = classLoader.loadClass("sun.misc.Unsafe")
val unsafeClass = classLoader.loadClass("sun.misc.Unsafe")
val field = unsafeClass.getDeclaredField("theUnsafe")
field.setAccessible(true)
val unsafe = field.get(null)
Expand All @@ -39,7 +39,7 @@ object CompatClassloader {
classLoader.getClass()
}
}.getDeclaredField("ucp")

def objectFieldOffset(field: java.lang.reflect.Field): Long =
unsafeClass
.getMethod(
Expand All @@ -62,7 +62,7 @@ object CompatClassloader {
val ucpFieldOffset = objectFieldOffset(ucpField)
val ucpObject = getObject(classLoader, ucpFieldOffset)

val pathField = ucpField.getType().getDeclaredField("path")
val pathField = ucpField.getType().getDeclaredField("path")
val pathFieldOffset = objectFieldOffset(pathField)
val paths: Seq[URL] = getObject(ucpObject, pathFieldOffset)
.asInstanceOf[java.util.ArrayList[URL]]
Expand Down

0 comments on commit d3c9902

Please sign in to comment.