• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Self defined object colouring in Eclipse?

 
Ranch Hand
Posts: 89
Netscape MySQL Database Windows XP
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 89
Netscape MySQL Database Windows XP
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic