| Summary: | Copy and paste the same function in a class gave NPE | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] JDT | Reporter: | Vikas Chandra <Vikas.Chandra> | ||||
| Component: | Core | Assignee: | Sasikanth Bharadwaj <sasikanth.bharadwaj> | ||||
| Status: | VERIFIED FIXED | QA Contact: | |||||
| Severity: | normal | ||||||
| Priority: | P3 | CC: | jarthana, sasikanth.bharadwaj, stephan.herrmann | ||||
| Version: | 4.8 | ||||||
| Target Milestone: | 4.8 M4 | ||||||
| Hardware: | PC | ||||||
| OS: | Windows 7 | ||||||
| See Also: |
https://git.eclipse.org/r/110306 https://git.eclipse.org/r/112536 https://git.eclipse.org/c/jdt/eclipse.jdt.core.git/commit/?id=f8ebd9dcd7fd27b8feb51794363d70a22ae2741f https://bugs.eclipse.org/bugs/show_bug.cgi?id=520482 |
||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
|
Description
Vikas Chandra
Created attachment 271068 [details]
Possible fix
>>In file InstallationDialog, I copy and pasted this method tabSelected
After the fix in previous comment, I get duplicate method error as I had expected. ( instead of build failure)
New Gerrit change created: https://git.eclipse.org/r/110306 >>In file InstallationDialog
This file is present in org.eclipse.ui.workbench which is present in ssh://git.eclipse.org/gitroot/platform/eclipse.platform.ui.git
Steps
1) Take ssh://git.eclipse.org/gitroot/platform/eclipse.platform.ui.git
2) Get plugin org.eclipse.ui.workbench
3) Go to java file InstallationDialog
4) Copy past private void tabSelected(TabItem item)
Expected Compile Error : Duplicate function error
Actual result: Build Error
I encountered this issue today also on Build id: I20171128-0100. Can anyone of you evaluate the patch or provide alternative fix. New Gerrit change created: https://git.eclipse.org/r/112536 (In reply to comment #6) > New Gerrit change created: https://git.eclipse.org/r/112536 We don't normally see this because the option ReportUnavoidableGenericTypeProblems is never disabled. When this option is disabled, trying to report raw type warnings causes this exception in the duplicate method which does not have a valid binding. Null check is sufficient in this case. Gerrit change https://git.eclipse.org/r/112536 was merged to [master]. Commit: http://git.eclipse.org/c/jdt/eclipse.jdt.core.git/commit/?id=f8ebd9dcd7fd27b8feb51794363d70a22ae2741f @Sasi, have you seen bug 520482? Is it the same? Perhaps you may want to adopt the test case? Note, that I also have a slightly more "sophisticated" solution. Which is better? (In reply to comment #9) > @Sasi, have you seen bug 520482? Is it the same? Perhaps you may want to adopt > the test case? > It is the same > Note, that I also have a slightly more "sophisticated" solution. Which is > better? I would say yours.. Verified for 4.8 M4 using build I20171205-2000. |