Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 511905 - [JUnit] NPE in TestViewer#findTestClass on right-click at an imported test suite
Summary: [JUnit] NPE in TestViewer#findTestClass on right-click at an imported test suite
Status: RESOLVED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.7   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 4.7 M6   Edit
Assignee: Noopur Gupta CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 443498
Blocks:
  Show dependency tree
 
Reported: 2017-02-08 07:30 EST by Noopur Gupta CLA
Modified: 2017-02-08 08:50 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Noopur Gupta CLA 2017-02-08 07:30:40 EST
1. Create and run a simple test case.
2. Export it from JUnit view.
3. Import the above in JUnit view.
4. Right-click a test suite element in the JUnit view.

We get this exception:

java.lang.NullPointerException
	at org.eclipse.jdt.internal.junit.ui.TestViewer.findTestClass(TestViewer.java:323)
	at org.eclipse.jdt.internal.junit.ui.TestViewer.handleMenuAboutToShow(TestViewer.java:274)
	at org.eclipse.jdt.internal.junit.ui.TestViewer$1.menuAboutToShow(TestViewer.java:253)
	at org.eclipse.jface.action.MenuManager.fireAboutToShow(MenuManager.java:339)
...