Archived

This forum has been archived. Please start a new discussion on GitHub.

FacetNotExistException thrown when servant is null

Not sure whether this is a bug in implementation or the implementation just lacks documentation for the behavior. The other day I accidentally passed null servant to ObjectAdapter.add method (the two-parameter variant). The add method didn't throw and happily accepted the null servant. When I later attempted to invoke methods on the servant from some other process, I've got rather confusing FacetNotExistException. Documentation states that this happens when method invocation uses incorrect facet, which confused me even more since both server and client used default facet. I would prefer ObjectAdapter.add or ObjectAdapter.activate to throw when some servant is null. Alternatively at least describe the actual behavior in documentation for FacetNotExistException.

Comments

  • mes
    mes California
    Hi,

    Sounds like a bug to me. Thanks for reporting this.

    Mark