• Post Reply Bookmark Topic Watch Topic
  • New Topic

Netbeans: Unable to debug equals method  RSS feed

 
Sam Sylva
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I need to debug the equals method implementation of a class I've made, but I cannot for the life of me get Netbeans' debugger to step into it. I can step into other methods from the class (most of which implement the methods in an interface) that are called in the main method (just like the equals method). I've tried...

-Disabling all the step filters
-Clearing the Netbeans cache
-Moving the call to the equals method out of the if statement it's in and just calling it as its own statement
-placing breakpoints within the equals method as well as on the call to the method
-placing a method breakpoint on the overridden equals method in addition to the other locations
-Using the shift-F7 version of the step into command

Anybody got any ideas? I'm using Netbeans 8.0.1 (I don't know if this is the latest version, but the last time I tried to update everything died and I had to completely remove NB and reinstall it) and JDK 8u05 (I think). Thanks!
 
Darryl Burke
Bartender
Posts: 5167
11
Java Netbeans IDE Opera
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
From your problem description, I'd say the equals(...) method you think is being invoked, isn't.

Try making a temp method with a different name and the same code and invoke that.
 
Sam Sylva
Greenhorn
Posts: 6
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Wow, why didn't I check that first? Print statement in the method I've been trying to call reveals that it indeed fails to execute. The parameter was the wrong type and the default equals method (Object's?) was being invoked instead. It works perfectly now. Thanks for humoring my idiocy :P
 
Tony Docherty
Bartender
Posts: 3271
82
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And Welcome to the Ranch
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!