- Notifications
You must be signed in to change notification settings - Fork 38.9k
Closed
Labels
in: webIssues in web modules (web, webmvc, webflux, websocket)Issues in web modules (web, webmvc, webflux, websocket)theme: kotlinAn issue related to Kotlin supportAn issue related to Kotlin supporttype: enhancementA general enhancementA general enhancement
Milestone
Description
When I create a ProblemDetail class in Kotlin and want to add properties, I have to do it AS-IS.
When adding object property configuration using a scope function like apply, why can't we do it like TO-BE?
If I didn't consider things like TO-BE in my previous class design, will it be okay if I try to propose code after writing a PR?
AS-IS
ProblemDetail.forStatusAndDetail( HttpStatusCode.valueOf(HttpStatus.BAD_REQUEST.value()), ErrorMessage.INVALID_INPUT.value, ).apply { setProperty("validationErrors" , validationErrors) }TO-BE
ProblemDetail.forStatusAndDetail( HttpStatusCode.valueOf(HttpStatus.BAD_REQUEST.value()), ErrorMessage.INVALID_INPUT.value, ).apply { properties = mapOf("validationErrors" to validationErrors) }wenodev, sjy5386, roharon and yongsk0066
Metadata
Metadata
Assignees
Labels
in: webIssues in web modules (web, webmvc, webflux, websocket)Issues in web modules (web, webmvc, webflux, websocket)theme: kotlinAn issue related to Kotlin supportAn issue related to Kotlin supporttype: enhancementA general enhancementA general enhancement