Fix compiler warnings in compiler code

This commit is contained in:
Alexander Udalov
2020-08-14 12:55:43 +02:00
parent 9b94e073af
commit a21f273570
84 changed files with 149 additions and 141 deletions
@@ -34,12 +34,12 @@ fun String.replUnescapeLineBreaks() = StringUtil.replace(this, XML_REPLACEMENTS,
fun String.replEscapeLineBreaks() = StringUtil.replace(this, SOURCE_CHARS, XML_REPLACEMENTS)
fun String.replOutputAsXml(escapeType: ReplEscapeType): String {
val escapedXml = StringUtil.escapeXml(replEscapeLineBreaks())
val escapedXml = StringUtil.escapeXmlEntities(replEscapeLineBreaks())
return "$XML_PREAMBLE<output type=\"$escapeType\">$escapedXml</output>"
}
fun String.replInputAsXml(): String {
val escapedXml = StringUtil.escapeXml(replEscapeLineBreaks())
val escapedXml = StringUtil.escapeXmlEntities(replEscapeLineBreaks())
return "$XML_PREAMBLE<input>$escapedXml</input>"
}
@@ -86,4 +86,4 @@ internal fun URLClassLoader.listLocalUrlsAsFiles(): List<File> {
internal fun <T : Any> List<T>.ensureNotEmpty(error: String): List<T> {
if (this.isEmpty()) throw IllegalStateException(error)
return this
}
}