|  | 
| 3 | 3 |  */ | 
| 4 | 4 | package dotty.tools.dotc.classpath | 
| 5 | 5 | 
 | 
| 6 |  | -import scala.language.unsafeNulls | 
| 7 |  | - | 
| 8 | 6 | import java.io.{File => JFile} | 
| 9 | 7 | import java.net.{URI, URL} | 
| 10 | 8 | import java.nio.file.{FileSystems, Files} | 
| @@ -119,7 +117,7 @@ trait JFileDirectoryLookup[FileEntryType <: ClassRepresentation] extends Directo | 
| 119 | 117 |   protected def toAbstractFile(f: JFile): AbstractFile = f.toPath.toPlainFile | 
| 120 | 118 |   protected def isPackage(f: JFile): Boolean = f.isPackage | 
| 121 | 119 | 
 | 
| 122 |  | -  assert(dir != null, "Directory file in DirectoryFileLookup cannot be null") | 
|  | 120 | +  assert(dir.asInstanceOf[JFile | Null] != null, "Directory file in DirectoryFileLookup cannot be null") | 
| 123 | 121 | 
 | 
| 124 | 122 |   def asURLs: Seq[URL] = Seq(dir.toURI.toURL) | 
| 125 | 123 |   def asClassPathStrings: Seq[String] = Seq(dir.getPath) | 
| @@ -216,7 +214,7 @@ final class JrtClassPath(fs: java.nio.file.FileSystem) extends ClassPath with No | 
| 216 | 214 | final class CtSymClassPath(ctSym: java.nio.file.Path, release: Int) extends ClassPath with NoSourcePaths { | 
| 217 | 215 |   import java.nio.file.Path, java.nio.file.* | 
| 218 | 216 | 
 | 
| 219 |  | -  private val fileSystem: FileSystem = FileSystems.newFileSystem(ctSym, null: ClassLoader) | 
|  | 217 | +  private val fileSystem: FileSystem = FileSystems.newFileSystem(ctSym, null.asInstanceOf[ClassLoader]) | 
| 220 | 218 |   private val root: Path = fileSystem.getRootDirectories.iterator.next | 
| 221 | 219 |   private val roots = Files.newDirectoryStream(root).iterator.asScala.toList | 
| 222 | 220 | 
 | 
|  | 
0 commit comments