AbstractStringBuilder, StringBuilder and java.io.File annotated with nullable/notnull
This commit is contained in:
@@ -207,6 +207,6 @@ fun File.readLines(charset : String = "UTF-8") : List<String> {
|
||||
*/
|
||||
fun File.listFiles(filter : (file : File) -> Boolean) : Array<File>? = listFiles(
|
||||
object : FileFilter {
|
||||
override fun accept(file: File?) = filter(file!!)
|
||||
override fun accept(file: File) = filter(file)
|
||||
}
|
||||
) as Array<File>?
|
||||
|
||||
+1
-1
@@ -35,7 +35,7 @@ class Html2CompilerPlugin(private val compilerArguments: KDocArguments) : Doclet
|
||||
private val sourceDirPaths: List<String> = sourceDirs.map { d -> d.getPath()!! }
|
||||
|
||||
private fun fileToWrite(psiFile: PsiFile): String {
|
||||
val file = File((psiFile.getVirtualFile() as CoreLocalVirtualFile).getPath()).getCanonicalFile()!!
|
||||
val file = File((psiFile.getVirtualFile() as CoreLocalVirtualFile).getPath()!!).getCanonicalFile()!!
|
||||
val filePath = file.getPath()!!
|
||||
for (sourceDirPath in sourceDirPaths) {
|
||||
if (filePath.startsWith(sourceDirPath) && filePath.length() > sourceDirPath.length()) {
|
||||
|
||||
@@ -212,7 +212,7 @@ class KModel(val context: BindingContext, val config: KDocConfig, val sourceDirs
|
||||
sourceDirs.map { file -> file.getCanonicalPath()!! }
|
||||
|
||||
fun relativePath(psiFile: PsiFile): String {
|
||||
val file = File((psiFile.getVirtualFile() as CoreLocalVirtualFile).getPath()).getCanonicalFile()!!
|
||||
val file = File((psiFile.getVirtualFile() as CoreLocalVirtualFile).getPath()!!).getCanonicalFile()!!
|
||||
val filePath = file.getPath()!!
|
||||
for (sourceDirPath in normalizedSourceDirs) {
|
||||
if (filePath.startsWith(sourceDirPath) && filePath.length() > sourceDirPath.length()) {
|
||||
|
||||
Reference in New Issue
Block a user