File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Testing and the fly likes JUnit Failure Trace links to wrong code sections Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Engineering » Testing
Bookmark "JUnit Failure Trace links to wrong code sections" Watch "JUnit Failure Trace links to wrong code sections" New topic
Author

JUnit Failure Trace links to wrong code sections

Iarla O'Riada
Ranch Hand

Joined: Oct 06, 2012
Posts: 84

In my failure trace, I see a NPE for a method on line 3074. But when I double click it in Eclipse, there is a blank line there. The file is a .class file, not a .java file so maybe Eclipse is not decompliling correctly. But I'm wondering if the wrong file is being used for this review somehow?
Jeanne Boyarsky
author & internet detective
Marshal

Joined: May 26, 2003
Posts: 30789
    
157

Old code seems likely. The first thing is to do project > clean to get rid of any old class files.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Iarla O'Riada
Ranch Hand

Joined: Oct 06, 2012
Posts: 84

Thanks Jeanne, you were right about the sources being out of date.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JUnit Failure Trace links to wrong code sections