Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit0cbcaa0

Browse files
committed
address comments in classpath and classfileparser
1 parente29e790 commit0cbcaa0

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

‎src/compiler/scala/tools/nsc/classpath/VirtualDirectoryClassPath.scala‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@ case class VirtualDirectoryClassPath(dir: VirtualDirectory) extends ClassPath wi
3030
caseSome(f)=> dir.iterator.filter(f).toArray
3131
case _=> dir.toArray
3232
}
33-
protecteddefhasChild(dir:AbstractFile,name:String):Boolean= dir.lookupName(name, directory=false).exists
33+
protecteddefhasChild(dir:AbstractFile,name:String):Boolean= dir.lookupName(name, directory=false)!=null
34+
3435
defgetName(f:AbstractFile):String= f.name
3536
deftoAbstractFile(f:AbstractFile):AbstractFile= f
3637
defisPackage(f:AbstractFile):Boolean= f.isPackage

‎src/compiler/scala/tools/nsc/classpath/ZipAndJarFileLookupFactory.scala‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,8 @@ object ZipAndJarClassPathFactory extends ZipAndJarFileLookupFactory {
7373
overrideprivate[nsc]defclasses(inPackage:PackageName):Seq[ClassFileEntry]= files(inPackage)
7474

7575
overrideprotecteddefcreateFileEntry(file:FileZipArchive#Entry):ClassFileEntryImpl=ClassFileEntryImpl(file)
76-
overrideprotecteddefisRequiredFileType(file:AbstractFile,fileExists:String=>Boolean):Boolean= {
77-
file.isClass&&!(file.hasExtension("class")&&fileExists(file.name.dropRight(6)+".tasty"))
76+
overrideprotecteddefisRequiredFileType(file:AbstractFile,siblingExists:String=>Boolean):Boolean= {
77+
file.isClass&&!(file.hasExtension("class")&&siblingExists(file.name.dropRight(6)+".tasty"))
7878
}
7979
}
8080

@@ -184,7 +184,7 @@ object ZipAndJarSourcePathFactory extends ZipAndJarFileLookupFactory {
184184
overrideprivate[nsc]defsources(inPackage:PackageName):Seq[SourceFileEntry]= files(inPackage)
185185

186186
overrideprotecteddefcreateFileEntry(file:FileZipArchive#Entry):SourceFileEntryImpl=SourceFileEntryImpl(file)
187-
overrideprotecteddefisRequiredFileType(file:AbstractFile,fileExists:String=>Boolean):Boolean= file.isScalaOrJavaSource
187+
overrideprotecteddefisRequiredFileType(file:AbstractFile,siblingExists:String=>Boolean):Boolean= file.isScalaOrJavaSource
188188
}
189189

190190
overrideprotecteddefcreateForZipFile(zipFile:AbstractFile,zipSettings:ZipSettings):ClassPathwithCloseable=ZipArchiveSourcePath(zipFile.file)

‎src/compiler/scala/tools/nsc/symtab/classfile/ClassfileParser.scala‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,6 @@ abstract class ClassfileParser(reader: ReusableInstance[ReusableDataReader]) {
7676
protectedvarclassTParams=Map[Name,Symbol]()
7777
protectedvarsrcfile0:Option[AbstractFile]=None
7878
protecteddefmoduleClass:Symbol= staticModule.moduleClass
79-
protectedvalTASTYUUIDLength:Int=16
8079
privatevarYtastyReader=false
8180

8281
privatedefownerForFlags(jflags:JavaAccFlags)=if (jflags.isStatic) moduleClasselse clazz

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp