* @author Brinda Santh
*/
object ResourceResolverUtils {
- private val log= LoggerFactory.getLogger(this::class.toString())
+
+ private val log = LoggerFactory.getLogger(this::class.toString())
fun getFileContent(filename: String, basePath: String?): String {
log.trace("file ({}), basePath ({}) ", filename, basePath)
try {
var resolvedFileName: String = filename
- if (filename.startsWith("http", true)
- || filename.startsWith("https", true)) {
+ if (filename.startsWith("http", true) ||
+ filename.startsWith("https", true)
+ ) {
val givenUrl: String = URL(filename).toString()
val systemUrl: String = File(".").toURI().toURL().toString()
log.trace("givenUrl ({}), systemUrl ({}) ", givenUrl, systemUrl)
if (givenUrl.startsWith(systemUrl)) {
-
}
} else {
if (!filename.startsWith("/")) {
}
}
}
- //FIXME("Convert into reactive")
+ // FIXME("Convert into reactive")
return JacksonUtils.getContent(resolvedFileName)
} catch (e: Exception) {
throw BluePrintException(e, "failed to file (%s), basePath (%s) ", filename, basePath)
}
}
-}
\ No newline at end of file
+}