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

Javadoc hover for method of parameterized type #1588

Closed
eric-milles opened this issue Jun 29, 2024 · 1 comment
Closed

Javadoc hover for method of parameterized type #1588

eric-milles opened this issue Jun 29, 2024 · 1 comment
Assignees
Labels
Milestone

Comments

@eric-milles
Copy link
Member

eric-milles commented Jun 29, 2024

Consider the following:

class C<T> {
  List<T> list_of_t
  void test() {
    list_of_t.add(null)
    list_of_t.findAll()
  }
}

Code hover for "add" and "findAll" fails due to type parameter T.

java.lang.IllegalArgumentException: "(LC;:TT;)Z" at 4
	at org.eclipse.jdt.internal.compiler.util.Util.newIllegalArgumentException(Util.java:1667)
	at org.eclipse.jdt.internal.compiler.util.Util.scanTypeSignature(Util.java:1272)
	at org.eclipse.jdt.core.Signature.getParameterCount(Signature.java:1725)
	at org.eclipse.jdt.core.Signature.getParameterTypes(Signature.java:1763)
	at org.eclipse.jdt.core.Signature.getParameterTypes(Signature.java:1801)
	at org.eclipse.jdt.internal.core.manipulation.JavaElementLabelComposerCore.appendMethodLabel(JavaElementLabelComposerCore.java:311)
	at org.eclipse.jdt.internal.core.manipulation.JavaElementLabelComposerCore.appendElementLabel(JavaElementLabelComposerCore.java:174)
	at org.eclipse.jdt.internal.ui.viewsupport.JavaElementLinks.getElementLabel(JavaElementLinks.java:761)
	at org.eclipse.jdt.internal.ui.viewsupport.JavaElementLinks.getElementLabel(JavaElementLinks.java:743)
	at org.eclipse.jdt.internal.ui.text.java.hover.JavadocHover.getInfoText(JavadocHover.java:806)
	at org.eclipse.jdt.internal.ui.text.java.hover.JavadocHover.getHoverInfo(JavadocHover.java:743)
java.lang.IllegalArgumentException: "<T::Ljava.lang.Object;>(Ljava.util.List<LC;:TT;>;Lgroovy.lang.Closure;)Ljava.util.List<LC;:TT;>;" at 43
	at org.eclipse.jdt.internal.compiler.util.Util.newIllegalArgumentException(Util.java:1667)
	at org.eclipse.jdt.internal.compiler.util.Util.scanTypeSignature(Util.java:1272)
	at org.eclipse.jdt.internal.compiler.util.Util.scanTypeArgumentSignature(Util.java:1599)
	at org.eclipse.jdt.internal.compiler.util.Util.scanTypeArgumentSignatures(Util.java:1563)
	at org.eclipse.jdt.internal.compiler.util.Util.scanClassTypeSignature(Util.java:1464)
	at org.eclipse.jdt.internal.compiler.util.Util.scanTypeSignature(Util.java:1252)
	at org.eclipse.jdt.core.Signature.getParameterCount(Signature.java:1725)
	at org.eclipse.jdt.core.Signature.getParameterTypes(Signature.java:1763)
	at org.eclipse.jdt.internal.core.util.KeyToSignature.consumeParameterizedGenericMethod(KeyToSignature.java:155)
	at org.eclipse.jdt.internal.core.util.BindingKeyParser.parseParameterizedMethod(BindingKeyParser.java:818)
	at org.eclipse.jdt.internal.core.util.BindingKeyParser.parseMethod(BindingKeyParser.java:898)
	at org.eclipse.jdt.internal.core.util.BindingKeyParser.parse(BindingKeyParser.java:704)
	at org.eclipse.jdt.internal.core.util.BindingKeyParser.parse(BindingKeyParser.java:650)
	at org.eclipse.jdt.core.BindingKey.toSignature(BindingKey.java:331)
	at org.eclipse.jdt.internal.core.manipulation.JavaElementLabelComposerCore.appendMethodLabel(JavaElementLabelComposerCore.java:248)
	at org.eclipse.jdt.internal.core.manipulation.JavaElementLabelComposerCore.appendElementLabel(JavaElementLabelComposerCore.java:174)
	at org.eclipse.jdt.internal.ui.viewsupport.JavaElementLinks.getElementLabel(JavaElementLinks.java:761)
	at org.eclipse.jdt.internal.ui.viewsupport.JavaElementLinks.getElementLabel(JavaElementLinks.java:743)
	at org.eclipse.jdt.internal.ui.text.java.hover.JavadocHover.getInfoText(JavadocHover.java:806)
	at org.eclipse.jdt.internal.ui.text.java.hover.JavadocHover.getHoverInfo(JavadocHover.java:743)

see #1422 and #1457

@eric-milles
Copy link
Member Author

image

eric-milles added a commit that referenced this issue Sep 30, 2024
- do not show type vars in javadoc display
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant