| Summary: | [1.8] UnsupportedOperationException with PolyTypeBinding on hover | ||
|---|---|---|---|
| Product: | [Eclipse Project] JDT | Reporter: | Noopur Gupta <noopur_gupta> |
| Component: | Core | Assignee: | Srikanth Sankaran <srikanth_sankaran> |
| Status: | RESOLVED DUPLICATE | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | anchakrk, markus.kell.r, srikanth_sankaran |
| Version: | 4.4 | ||
| Target Milestone: | BETA J8 | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | |||
| Bug Depends on: | |||
| Bug Blocks: | 423585 | ||
Please refer to code patch uploaded in Bug 423584, which fixes the issue. Test upload to follow Verified that the patch in bug 423582 comment #7 resolves the UOE issue. Thanks Noopur. *** This bug has been marked as a duplicate of bug 423582 *** |
package test; import java.util.function.Supplier; public class Bug { private void fun1() { Runnable runnable = () -> { System.out.println("hi"); }; fun2(() -> runnable); // Error } private void fun2(Object c) {} } -------------------------------------------------- The above code has error at the line with comment. Hover over the opening parentheses of "fun2" invocation at the line with error. We get the following exception (org.eclipse.jdt.core.dom.TypeBinding#getQualifiedName should consider PolyTypeBinding): java.lang.UnsupportedOperationException at org.eclipse.jdt.internal.compiler.lookup.PolyTypeBinding.getPackage(PolyTypeBinding.java:33) at org.eclipse.jdt.core.dom.TypeBinding.getQualifiedName(TypeBinding.java:814) at org.eclipse.jdt.internal.corext.refactoring.nls.NLSHintHelper.getAccessorClassReference(NLSHintHelper.java:144) at org.eclipse.jdt.internal.ui.text.java.hover.NLSStringHover.internalGetHoverInfo(NLSStringHover.java:159) at org.eclipse.jdt.internal.ui.text.java.hover.NLSStringHover.getHoverInfo2(NLSStringHover.java:114) at org.eclipse.jdt.internal.ui.text.java.hover.BestMatchHover.getHoverInfo2(BestMatchHover.java:163) at org.eclipse.jdt.internal.ui.text.java.hover.BestMatchHover.getHoverInfo2(BestMatchHover.java:129) at org.eclipse.jdt.internal.ui.text.java.hover.JavaEditorTextHoverProxy.getHoverInfo2(JavaEditorTextHoverProxy.java:85) at org.eclipse.jface.text.TextViewerHoverManager$4.run(TextViewerHoverManager.java:166)