Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Self defined object colouring in Eclipse?  RSS feed

 
Daan Heuvelbeuk
Ranch Hand
Posts: 85
MySQL Database Netscape Windows XP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When you develop your own code, you create your own objects and use them where appropriate. All of a sudden I have a NullPointerException in my code. I know that NullPointerException.equals(DeveloperError). But in my logging I see contents of that same object displayed. The only thing I notice is that the object in my Eclipse listing first has blue characters. I can ask that object to display its contents. A few lines later my object has blue characters, and when I ask the object for one field, I get the NullPointerException.

Can anyone tell me the importance of the colour change of the object in Eclipse? And probably the solution of my problem?

Some code:

Some logging:
 
Daan Heuvelbeuk
Ranch Hand
Posts: 85
MySQL Database Netscape Windows XP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Although the project object was created, it was created inside the if loop. Outside it the project object does not exist. That's why the two instances (?) of project where differently coloured, and I got the NullPointerException. So clearly a DeveloperError.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!