Skip to content

Commit

Permalink
Improve diagnostics for EA-100849
Browse files Browse the repository at this point in the history
KNPE: DeserializerForClassfileDecompilerKt.DeserializerForClassfileDecompiler
  • Loading branch information
yole committed May 12, 2017
1 parent db1f8c7 commit f53b9aa
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ import java.io.InputStream

fun DeserializerForClassfileDecompiler(classFile: VirtualFile): DeserializerForClassfileDecompiler {
val kotlinClassHeaderInfo = IDEKotlinBinaryClassCache.getKotlinBinaryClassHeaderData(classFile)
assert(kotlinClassHeaderInfo != null) { "Decompiled data factory shouldn't be called on an unsupported file: " + classFile }
val packageFqName = kotlinClassHeaderInfo!!.classId.packageFqName
?: error("Decompiled data factory shouldn't be called on an unsupported file: " + classFile)
val packageFqName = kotlinClassHeaderInfo.classId.packageFqName
return DeserializerForClassfileDecompiler(classFile.parent!!, packageFqName)
}

Expand Down

0 comments on commit f53b9aa

Please sign in to comment.