Minor: auto-format of module: webserver

This commit is contained in:
Mike Hearn 2017-04-11 12:54:37 +02:00
parent 4d6d4c167e
commit e62250ff7b
4 changed files with 10 additions and 10 deletions

View File

@ -61,9 +61,9 @@ data class CmdLineOptions(val baseDirectory: Path,
}
private fun loadConfig(baseDirectory: Path,
configFile: Path = baseDirectory / "node.conf",
allowMissingConfig: Boolean = false,
configOverrides: Map<String, Any?> = emptyMap()): Config {
configFile: Path = baseDirectory / "node.conf",
allowMissingConfig: Boolean = false,
configOverrides: Map<String, Any?> = emptyMap()): Config {
val parseOptions = ConfigParseOptions.defaults()
val defaultConfig = ConfigFactory.parseResources("web-reference.conf", parseOptions.setAllowMissing(false))
val appConfig = ConfigFactory.parseFile(configFile.toFile(), parseOptions.setAllowMissing(allowMissingConfig))

View File

@ -7,11 +7,11 @@ import javax.ws.rs.ext.Provider
// Provides basic exception logging to all APIs
@Provider
class AllExceptionMapper: ExceptionMapper<Exception> {
class AllExceptionMapper : ExceptionMapper<Exception> {
companion object {
val logger = loggerFor<APIServerImpl>()
}
override fun toResponse(exception: Exception?): Response {
logger.error("Unhandled exception in API", exception)
return Response.status(500).build()

View File

@ -11,7 +11,7 @@ import javax.servlet.http.HttpServletResponse
/**
* Uploads to the node via the [CordaRPCOps] uploadFile interface.
*/
class DataUploadServlet: HttpServlet() {
class DataUploadServlet : HttpServlet() {
private val log = loggerFor<DataUploadServlet>()
override fun doPost(req: HttpServletRequest, resp: HttpServletResponse) {

View File

@ -40,10 +40,10 @@ task buildWebserverJar(type: FatCapsule) {
applicationClass 'net.corda.webserver.WebServer'
archiveName "corda-webserver-${corda_version}.jar"
applicationSource = files(
project.tasks.findByName('jar'),
new File(project(':node').rootDir, 'node/build/classes/main/CordaCaplet.class'),
new File(project(':node').rootDir, 'node/build/classes/main/CordaCaplet$1.class'),
'config/dev/log4j2.xml'
project.tasks.findByName('jar'),
new File(project(':node').rootDir, 'node/build/classes/main/CordaCaplet.class'),
new File(project(':node').rootDir, 'node/build/classes/main/CordaCaplet$1.class'),
'config/dev/log4j2.xml'
)
from 'NOTICE' // Copy CDDL notice