matthiasblaesing commented on issue #4044: URL: https://github.com/apache/netbeans/issues/4044#issuecomment-1113980281
I can reproduce this with a simple Maven Projekt: [mavenproject1.zip](https://github.com/apache/netbeans/files/8596824/mavenproject1.zip) The result is:  In the log it can be observed: ``` FINE [org.netbeans.api.java.source.ElementHandle]: Resolving element kind: METHOD FINE [org.netbeans.api.java.source.ElementHandle]: Calling getTypeElementByBinaryName: signature = com.google.gson.Gson FINE [org.netbeans.api.java.source.ElementHandle]: All resolvings failed. Returning null. INFO [org.netbeans.api.java.source.ElementHandle]: Cannot resolve: ElementHandle[kind=METHOD; sigs=com.google.gson.Gson newBuilder ()Lcom/google/gson/GsonBuilder; ] ``` it seems, that there is something wrong with the compiler task that is used to scan the classpath: ``` FINE [org.netbeans.modules.java.source.usages.ClassFileUtil]: Calling createExecutableDescriptor: ExecutableElement = newBuilder() FINE [org.netbeans.modules.java.source.usages.ClassFileUtil]: Result of encodeClassNameOrArray = com.google.gson.Gson FINE [org.netbeans.modules.java.source.usages.ClassFileUtil]: Result of createExecutableDescriptor = [com.google.gson.Gson, newBuilder, ()LGsonBuilder;] ``` The return type looks broken. It is missing the `package` portion. I had a closed look at the beginning of `org.netbeans.modules.java.source.usages.ClassFileUtil.createExecutableDescriptor(ExecutableElement)`. The value of `ee.getReturnType` is: `Type$errorType`. So the question is: Why does the task fail to resolve the return type? @jlahoda sorry to bother you again, but know the compiler infrastructure best, maybe you have an idea where this breaks down? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] For further information about the NetBeans mailing lists, visit: https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
