Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong getter name and type for boolean properties in Javadoc #2017

Closed
ltennstedt opened this issue Jul 9, 2021 · 4 comments · Fixed by #2356
Closed

Wrong getter name and type for boolean properties in Javadoc #2017

ltennstedt opened this issue Jul 9, 2021 · 4 comments · Fixed by #2356
Labels
bug format: Javadoc An issue/PR related to Dokka's Javadoc output format or the Javadoc comments in general

Comments

@ltennstedt
Copy link

Describe the bug
Even if a property's return value is of a primitive type, the boxed wrapper type will be shown in Javadoc generated by Dokka, and in case of boolean the getter name in Javadoc is prefixed mistakenly with get (getIsDyadic()).

Expected behaviour
The primitve type and the correct name should be shown in Javadoc.
suggestions
javadoc

To Reproduce
https://github.com/ltennstedt/finnmath

Dokka configuration

dokkaJavadoc {
    dokkaSourceSets {
        configureEach {
            jdkVersion.set(8)
            noJdkLink.set(true)
            noStdlibLink.set(true)
        }
    }
}

Installation

  • Operating system: Ubuntu 20.04 LTS
  • Build tool: Gradle v7.1
  • Dokka version: 1.5.0

Are you willing to provide a PR?
Maybe with your help.

@ltennstedt ltennstedt added the bug label Jul 9, 2021
@MarcinAman
Copy link
Contributor

The issue is here quite different:
when you use a kotlin property from java you use it via getX or isX depending on the type of the variable. Here the bug is that we blindly use getX instead of is convention. Also in this case property in kotlin already is prefixed with is so it should be left "as is".

If you would like to fix it bug probably could be fixed somewhere here:

@MarcinAman MarcinAman added the format: Javadoc An issue/PR related to Dokka's Javadoc output format or the Javadoc comments in general label Jul 9, 2021
@ltennstedt
Copy link
Author

@MarcinAman I'm going to take a closer look at this this weekend and if I'm successful, I'll make a PR.

@IgnatBeresnev
Copy link
Member

IgnatBeresnev commented Jan 20, 2022

I had a look at this recently - you'd think the bug would in KotlinToJavaConverter, but no. I found it here:

but I guess the converter also needs to be checked and corrected

@IgnatBeresnev
Copy link
Member

Fixed in #2356, should be included in the nearest release (1.6.20)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug format: Javadoc An issue/PR related to Dokka's Javadoc output format or the Javadoc comments in general
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants