@@ -18,8 +18,6 @@ import BTypes.InternalName
1818import  scala .util .chaining .* 
1919import  dotty .tools .io .JarArchive 
2020
21- import  scala .language .unsafeNulls 
22- 
2321/**  !!! This file is now copied in `dotty.tools.io.FileWriters` in a more general way that does not rely upon
2422 * `PostProcessorFrontendAccess`, this should probably be changed to wrap that class instead. 
2523 * 
@@ -54,11 +52,11 @@ class ClassfileWriters(frontendAccess: PostProcessorFrontendAccess) {
5452    def  close ():  Unit 
5553
5654    protected  def  classRelativePath (className : InternalName , suffix : String  =  " .class" :  String  = 
57-       className.replace('.' , '/' ).nn  +  suffix
55+       className.replace('.' , '/' ) +  suffix
5856  }
5957
6058  object  ClassfileWriter  {
61-     private  def  getDirectory (dir : String ):  Path  =  Paths .get(dir).nn 
59+     private  def  getDirectory (dir : String ):  Path  =  Paths .get(dir)
6260
6361    def  apply ():  ClassfileWriter  =  {
6462      val  jarManifestMainClass :  Option [String ] =  compilerSettings.mainClass.orElse {
@@ -137,7 +135,7 @@ class ClassfileWriters(frontendAccess: PostProcessorFrontendAccess) {
137135        new  JarEntryWriter (jarFile, jarManifestMainClass, jarCompressionLevel)
138136      }
139137      else  if  (file.isVirtual) new  VirtualFileWriter (file)
140-       else  if  (file.isDirectory) new  DirEntryWriter (file.file.toPath.nn )
138+       else  if  (file.isDirectory) new  DirEntryWriter (file.file.toPath)
141139      else  throw  new  IllegalStateException (s " don't know how to handle an output of  $file [ ${file.getClass}] " )
142140  }
143141
@@ -151,7 +149,7 @@ class ClassfileWriters(frontendAccess: PostProcessorFrontendAccess) {
151149    val  jarWriter :  JarOutputStream  =  {
152150      import  scala .util .Properties .* 
153151      val  manifest  =  new  Manifest 
154-       val  attrs  =  manifest.getMainAttributes.nn 
152+       val  attrs  =  manifest.getMainAttributes
155153      attrs.put(MANIFEST_VERSION , " 1.0" 
156154      attrs.put(ScalaCompilerVersion , versionNumberString)
157155      mainClass.foreach(c =>  attrs.put(MAIN_CLASS , c))
@@ -184,7 +182,7 @@ class ClassfileWriters(frontendAccess: PostProcessorFrontendAccess) {
184182      //  important detail here, even on Windows, Zinc expects the separator within the jar
185183      //  to be the system default, (even if in the actual jar file the entry always uses '/').
186184      //  see https://github.com/sbt/zinc/blob/dcddc1f9cfe542d738582c43f4840e17c053ce81/internal/compiler-bridge/src/main/scala/xsbt/JarUtils.scala#L47
187-       val  pathInJar  =   
185+       val  pathInJar  = 
188186        if  File .separatorChar ==  '/'  then  relativePath
189187        else  relativePath.replace('/' , File .separatorChar)
190188      PlainFile .toPlainFile(Paths .get(s " ${file.absolutePath}! $pathInJar" ))
@@ -293,5 +291,5 @@ class ClassfileWriters(frontendAccess: PostProcessorFrontendAccess) {
293291  }
294292
295293  /**  Can't output a file due to the state of the file system. */  
296-   class  FileConflictException (msg : String , cause : Throwable  =  null ) extends  IOException (msg, cause)
294+   class  FileConflictException (msg : String , cause : Throwable  |   Null   =  null ) extends  IOException (msg, cause)
297295}
0 commit comments