Skip to content

Commit ce77b5c

Browse files
authored
Merge pull request #8389 from homberghp/issue8388
NPE in profiler during code scan on start and or opening existing (netbeans) project
2 parents a19ec46 + 8811149 commit ce77b5c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: profiler/profiler.nbimpl/src/org/netbeans/modules/profiler/nbimpl/providers/JavaProfilerSourceImpl.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -636,7 +636,7 @@ public void run(final CompilationController cc) throws Exception {
636636
@Override
637637
public Void visitMethod(MethodTree node, Void p) {
638638
Element e = cc.getTrees().getElement(getCurrentPath());
639-
if (e.getKind() == ElementKind.METHOD) {
639+
if (e != null && e.getKind() == ElementKind.METHOD) {
640640
ExecutableElement ee = (ExecutableElement)e;
641641
if (ee.getSimpleName().contentEquals("suite") && // NOI18N
642642
(ee.getReturnType().toString().equals(JUNIT_TEST) ||

0 commit comments

Comments
 (0)