#131 Linking to Java static field generates many w...
# dokka
u
#131 Linking to Java static field generates many warnings, and creates dummy ("#") link [Kotlin/dokka] Issue created by xenomachina When I try to link to a Java static field in my KDoc, Dokka generates many warnings, and creates a dummy link in the generated HTML. To rule out something wrong with my build, I reproduced this problem in the dokka-gradle-example from kotlin-examples. I changed the
Greeter
class in HelloWorld.kt to look like this:
Copy code
kotlin
/**
• This class supports greeting people by name to [System.out].
• 
• @property name The name of the person to be greeted.
     */
     class Greeter(val name: String) {

     /**
     • Prints the greeting to the standard output.
          */
          fun greet() {
          System.out.println("Hello $name!")
}
}
Executing
./gradlew dokka
resulted in:
Copy code
:dokka
No documentation for demo$main(kotlin.Array((kotlin.String))) (HelloWorld.kt:18)
Can't find node by signature java.lang.System$out
Can't find node by signature java.lang.System$out
Can't find node by signature java.lang.System$out
Can't find node by signature java.lang.System$out
Can't find node by signature java.lang.System$out
Can't find node by signature java.lang.System$out
Can't find node by signature java.lang.System$out
Can't find node by signature java.lang.System$out

BUILD SUCCESSFUL
In the generated HTML the links look like:
Copy code
<a href="#">System.out</a>
At most this should generate one warning, but from the docs I could not see any problem with the link syntax I'm using, so I don't know why it didn't generate a working link. Linking to the class (ie:
System
) or a static method in the class (eg:
System.console()
) both work as expected, so this behavior seems to be peculiar to static fields.