[MetricsReloaded] NPE in 0.3.1

I decided to try out MetricsReloaded this morning and I get the following exception when I run. I've tried project, module, and package level tests and they all result in the same thing. A couple of classes get processed, then the exception.

Todd Breiholz

2004-06-24 09:49:27,738 ERROR - llij.ide.plugins.PluginManager -
2004-06-24 09:49:27,738 ERROR - llij.ide.plugins.PluginManager - IntelliJ IDEA (Pallada) Build #2128
2004-06-24 09:49:27,738 ERROR - llij.ide.plugins.PluginManager - JDK: 1.4.2_04
2004-06-24 09:49:27,738 ERROR - llij.ide.plugins.PluginManager - VM: Java HotSpot(TM) Client VM
2004-06-24 09:49:27,738 ERROR - llij.ide.plugins.PluginManager - Vendor: Sun Microsystems Inc.
2004-06-24 09:49:27,738 ERROR - llij.ide.plugins.PluginManager - OS: Windows XP
2004-06-24 09:49:27,738 ERROR - llij.ide.plugins.PluginManager - Last Action: Metrics.ProjectMetricsAction
2004-06-24 09:49:27,738 ERROR - llij.ide.plugins.PluginManager -
java.lang.NullPointerException
at com.intellij.openapi.roots.d.s.isInTestSourceContent(s.java:61)
at com.siyeh.metrics.utils.TestUtils.isTest(TestUtils.java:38)
at com.siyeh.metrics.utils.TestUtils.isTest(TestUtils.java:46)
at com.siyeh.metrics.classMetrics.ClassDependenciesListener.addDependency(ClassDependenciesListener.java:264)
at com.siyeh.metrics.classMetrics.ClassDependenciesListener.beforeReferenceExpression(ClassDependenciesListener.java:159)
at com.siyeh.metrics.Traversal.visitReferenceExpression(Traversal.java:23)
at com.intellij.psi.c.a.f.a.bj.accept(bj.java:202)
at com.intellij.psi.c.a.f.d.acceptChildren(d.java:11)
at com.intellij.psi.PsiRecursiveElementVisitor.visitElement(PsiRecursiveElementVisitor.java:11)
at com.intellij.psi.JavaElementVisitor.visitExpression(JavaElementVisitor.java:110)
at com.siyeh.metrics.Traversal.visitExpression(Traversal.java:325)
at com.intellij.psi.JavaElementVisitor.visitBinaryExpression(JavaElementVisitor.java:38)
at com.siyeh.metrics.Traversal.visitBinaryExpression(Traversal.java:294)
at com.intellij.psi.c.a.f.a.h.accept(h.java:2)
at com.intellij.psi.c.a.f.d.acceptChildren(d.java:11)
at com.intellij.psi.PsiRecursiveElementVisitor.visitElement(PsiRecursiveElementVisitor.java:11)
at com.intellij.psi.JavaElementVisitor.visitExpression(JavaElementVisitor.java:110)
at com.siyeh.metrics.Traversal.visitExpression(Traversal.java:325)
at com.intellij.psi.JavaElementVisitor.visitBinaryExpression(JavaElementVisitor.java:38)
at com.siyeh.metrics.Traversal.visitBinaryExpression(Traversal.java:294)
at com.intellij.psi.c.a.f.a.h.accept(h.java:2)
at com.intellij.psi.c.a.f.d.acceptChildren(d.java:11)
at com.intellij.psi.PsiRecursiveElementVisitor.visitElement(PsiRecursiveElementVisitor.java:11)
at com.intellij.psi.JavaElementVisitor.visitStatement(JavaElementVisitor.java:268)
at com.siyeh.metrics.Traversal.visitStatement(Traversal.java:153)
at com.intellij.psi.JavaElementVisitor.visitIfStatement(JavaElementVisitor.java:146)
at com.siyeh.metrics.Traversal.visitIfStatement(Traversal.java:242)
at com.intellij.psi.c.a.f.a.w.accept(w.java:34)
at com.intellij.psi.c.a.f.d.acceptChildren(d.java:11)
at com.intellij.psi.PsiRecursiveElementVisitor.visitElement(PsiRecursiveElementVisitor.java:11)
at com.intellij.psi.JavaElementVisitor.visitCodeBlock(JavaElementVisitor.java:66)
at com.intellij.psi.c.a.f.a.bv.accept(bv.java:49)
at com.intellij.psi.c.a.n.acceptChildren(n.java:8)
at com.intellij.psi.PsiRecursiveElementVisitor.visitElement(PsiRecursiveElementVisitor.java:11)
at com.intellij.psi.JavaElementVisitor.visitMethod(JavaElementVisitor.java:190)
at com.siyeh.metrics.Traversal.visitMethod(Traversal.java:211)
at com.intellij.psi.c.a.be.accept(be.java:5)
at com.intellij.psi.c.a.n.acceptChildren(n.java:8)
at com.intellij.psi.PsiRecursiveElementVisitor.visitElement(PsiRecursiveElementVisitor.java:11)
at com.intellij.psi.JavaElementVisitor.visitClass(JavaElementVisitor.java:54)
at com.siyeh.metrics.Traversal.visitClass(Traversal.java:281)
at com.intellij.psi.c.a.q.accept(q.java:105)
at com.intellij.psi.c.a.n.acceptChildren(n.java:8)
at com.intellij.psi.PsiRecursiveElementVisitor.visitElement(PsiRecursiveElementVisitor.java:11)
at com.intellij.psi.JavaElementVisitor.visitFile(JavaElementVisitor.java:130)
at com.intellij.psi.JavaElementVisitor.visitJavaFile(JavaElementVisitor.java:320)
at com.siyeh.metrics.Traversal.visitJavaFile(Traversal.java:193)
at com.intellij.psi.c.a.bb.accept(bb.java:132)
at com.siyeh.metrics.MetricsManagerImpl$1.run(MetricsManagerImpl.java:70)
at com.intellij.openapi.progress.a.a.runProcess(a.java:30)
at com.intellij.openapi.l.a.c$1a_.run(c$1a_.java:12)

1 comment
Comment actions Permalink

I can't reproduce it, but I think I've got a fix for it, based on the stack trace. It'll be in the next release, probably in a couple of weeks.

--Dave Griffith

0

Please sign in to leave a comment.