mirror of
https://github.com/corda/corda.git
synced 2025-02-20 09:26:41 +00:00
Reformat files in webserver
This commit is contained in:
parent
3f3ffd50e1
commit
f9dc331551
@ -120,7 +120,7 @@ class NodeWebServer(val config: WebServerConfig) {
|
||||
}
|
||||
|
||||
@Throws(IOException::class)
|
||||
override fun writeErrorPageMessage(request: HttpServletRequest, writer: Writer, code: Int, message: String , uri: String) {
|
||||
override fun writeErrorPageMessage(request: HttpServletRequest, writer: Writer, code: Int, message: String, uri: String) {
|
||||
writer.write("<h1>Corda $safeLegalName</h1>\n")
|
||||
super.writeErrorPageMessage(request, writer, code, message, uri)
|
||||
}
|
||||
@ -135,10 +135,10 @@ class NodeWebServer(val config: WebServerConfig) {
|
||||
}
|
||||
|
||||
val resourceConfig = ResourceConfig()
|
||||
.register(ObjectMapperConfig(rpcObjectMapper))
|
||||
.register(ResponseFilter())
|
||||
.register(CordaConverterProvider)
|
||||
.register(APIServerImpl(localRpc))
|
||||
.register(ObjectMapperConfig(rpcObjectMapper))
|
||||
.register(ResponseFilter())
|
||||
.register(CordaConverterProvider)
|
||||
.register(APIServerImpl(localRpc))
|
||||
|
||||
val webAPIsOnClasspath = pluginRegistries.flatMap { x -> x.webApis }
|
||||
for (webapi in webAPIsOnClasspath) {
|
||||
|
@ -55,7 +55,7 @@ class AttachmentDownloadServlet : HttpServlet() {
|
||||
|
||||
// Closing the output stream commits our response. We cannot change the status code after this.
|
||||
resp.outputStream.close()
|
||||
} catch(e: FileNotFoundException) {
|
||||
} catch (e: FileNotFoundException) {
|
||||
log.warn("404 Not Found whilst trying to handle attachment download request for ${servletContext.contextPath}/$reqPath")
|
||||
resp.sendError(HttpServletResponse.SC_NOT_FOUND)
|
||||
return
|
||||
|
@ -15,7 +15,7 @@ import javax.servlet.http.HttpServletResponse
|
||||
* Dumps some data about the installed CorDapps.
|
||||
* TODO: Add registered flow initiators.
|
||||
*/
|
||||
class CorDappInfoServlet(val plugins: List<WebServerPluginRegistry>, val rpc: CordaRPCOps): HttpServlet() {
|
||||
class CorDappInfoServlet(val plugins: List<WebServerPluginRegistry>, val rpc: CordaRPCOps) : HttpServlet() {
|
||||
|
||||
@Throws(IOException::class)
|
||||
override fun doGet(req: HttpServletRequest, resp: HttpServletResponse) {
|
||||
@ -73,7 +73,7 @@ class CorDappInfoServlet(val plugins: List<WebServerPluginRegistry>, val rpc: Co
|
||||
|
||||
for (method in resource.allMethods) {
|
||||
if (method.type == ResourceMethod.JaxrsType.SUB_RESOURCE_LOCATOR) {
|
||||
resources.add( Resource.from(resource.resourceLocator.invocable.definitionMethod.returnType))
|
||||
resources.add(Resource.from(resource.resourceLocator.invocable.definitionMethod.returnType))
|
||||
} else {
|
||||
endpoints.add(Endpoint(method.httpMethod, "api$path", resource.path))
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user