Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#25 Invoking non-static methods on a class.

closed-fixed
nobody
General (151)
5
2001-05-04
2001-03-15
Allan Crooks
No

If you try to perform the following line of code:

ArrayList.add (new Object());

A null-pointer exception is thrown. Now of course,
since the add method is not static, this method is
bound to fail. However, the interpreter should
probably return some meaningful message to indicate
this is the situation, rather than throwing
the "Unknown error" message.

Discussion

  • Pat Niemeyer
    Pat Niemeyer
    2001-05-04

    • status: open --> closed-fixed
     
  • Pat Niemeyer
    Pat Niemeyer
    2001-05-04

    Logged In: YES
    user_id=18885

    Fixed in the next release.

    Thanks,
    Pat