marko ziza
04/11/2022, 4:47 PMpublic static Document parse(File file, @Nullable String charsetName) throws IOException {
return DataUtil.load(file, charsetName, file.getAbsolutePath());
}
when I call this code from Kotlin,
val document = Jsoup.parse(inputHTML, null )
I get
Kotlin: Null can not be a value of a non-null type String
How can I call this with Java type null, since parameter is @Nullable and therefore Null should be accepted.ephemient
04/11/2022, 5:01 PMinputHTML
? Jsoup has multiple overloads and there's a non-nullable Jsoup.parse(String, String)
methodnkiesel
04/11/2022, 5:01 PMinputHTML
? JSoup also has a `public static Document parse(String html, Parser parser)`methodmarko ziza
04/11/2022, 6:49 PM