最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

kotlin - IntelliJ keeps giving cannot resolve @param in jdocskdocs - Stack Overflow

programmeradmin2浏览0评论

Not sure what I am doing wrong

/**
 * Converts a DTO to its entity representation.
 *
 * @param dto The source DTO
 * @return [EmergencyContactEntity] containing the mapped data
 */
/***********************/
/* FROM DTO TO ENTITY. */
/***********************/
internal fun toEntity(dto: EmergencyContactDTO): EmergencyContactEntity {
    return EmergencyContactDTOEntityMapMapper.toEntity(dto)
}

IntelliJ before I push the code to a repo, gives:

Warning:(24, 15) Cannot resolve symbol 'dto'

Any ideas?

Not sure what I am doing wrong

/**
 * Converts a DTO to its entity representation.
 *
 * @param dto The source DTO
 * @return [EmergencyContactEntity] containing the mapped data
 */
/***********************/
/* FROM DTO TO ENTITY. */
/***********************/
internal fun toEntity(dto: EmergencyContactDTO): EmergencyContactEntity {
    return EmergencyContactDTOEntityMapMapper.toEntity(dto)
}

IntelliJ before I push the code to a repo, gives:

Warning:(24, 15) Cannot resolve symbol 'dto'

Any ideas?

Share Improve this question edited yesterday Sachin asked yesterday SachinSachin 4973 silver badges13 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 2

Between the documentation comments and the function declaration, you have this block of comment

/***********************/
/* FROM DTO TO ENTITY. */
/***********************/

The last line starts with /**, so the last line is treated as the documentation comment associated to the function. So the actual documentation comments at the beginning isn't treated as documenting the function declaration.

Assuming you don't want "FROM DTO TO ENTITY" to be part of the documentation, you should write it using // comments.

/**
 * Converts a DTO to its entity representation.
 *
 * @param dto The source DTO
 * @return [EmergencyContactEntity] containing the mapped data
 */
///***********************/
///* FROM DTO TO ENTITY. */
///***********************/
internal fun toEntity(dto: EmergencyContactDTO): EmergencyContactEntity

Since this is a // comment, you don't need that many slashes. This looks better in my opinion:

//***********************
//* FROM DTO TO ENTITY. *
//***********************

Or you can start a regular block comment with /* (not /**!) just after the */ of the documentation comment:

/**
 * Converts a DTO to its entity representation.
 *
 * @param dto The source DTO
 * @return [EmergencyContactEntity] containing the mapped data
 *//*
***********************
* FROM DTO TO ENTITY. *
***********************/
internal fun toEntity(dto: EmergencyContactDTO): EmergencyContactEntity

Note

发布评论

评论列表(0)

  1. 暂无评论