groovy

allow certain mehtods to be called on null

Details

  • Type: Improvement Improvement
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: 1.0-JSR-3
  • Fix Version/s: 1.0-JSR-6
  • Component/s: None
  • Labels:
    None
  • Number of attachments :
    0

Description

> cannot call
> null.inspect()
> and
> null.dump()
> although these methods' implementation would be able
> to deal with this.
> The invoke mechanism checks for null prevent this.
> Either adapt the invoke mechanism or simplify the
> implementations.

blackdrag:

I think we should adapt the invoker mechanism for this and give "null"
some methods. we could convert null into a constant NullObject, and use
this instead. I think the changes are minimal.

Issue Links

Activity

Hide
Guillaume ALLEON added a comment -

Solved by implementing a singleton null object.
Thanks to blackdarg for its support

Show
Guillaume ALLEON added a comment - Solved by implementing a singleton null object. Thanks to blackdarg for its support

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: