Skip to content

Commit 929c7cd

Browse files
committed
Remove @volatile on calls of val
1 parent 6653de5 commit 929c7cd

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

compiler/src/dotty/tools/io/ZipArchive.scala

+1-1
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ final class FileZipArchive(jpath: JPath, release: Option[String]) extends ZipArc
160160
override def sizeOption: Option[Int] = Some(zipEntry.getSize.toInt)
161161
}
162162

163-
@volatile lazy val (root, allDirs): (DirEntry, collection.Map[String, DirEntry]) = {
163+
lazy val (root, allDirs): (DirEntry, collection.Map[String, DirEntry]) = {
164164
val root = new DirEntry("/", null)
165165
val dirs = mutable.HashMap[String, DirEntry]("/" -> root)
166166
val zipFile = openZipFile()

sbt-test/sbt-dotty/scaladoc/src/main/scala/AutoParamTupling.scala

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ object AutoParamTupling {
1111
* In order to get thread safety, you need to put @volatile before lazy vals.
1212
* https://dotty.epfl.ch/docs/reference/changed-features/lazy-vals.html
1313
*/
14-
@volatile lazy val xs: List[String] = List("d", "o", "t", "t", "y")
14+
lazy val xs: List[String] = List("d", "o", "t", "t", "y")
1515

1616
/**
1717
* Current behaviour in Scala 2.12.2 :

0 commit comments

Comments
 (0)