jsr236-experts@concurrency-ee-spec.java.net

[jsr236-experts] Question on ContextService javadoc

From: Anthony Lai <anthony.lai_at_oracle.com>
Date: Tue, 19 Mar 2013 14:59:28 -0700

In the createContextualProxy methods in ContextService, we have the
following in the javadoc:

Throws:
    |IllegalArgumentException
    <http://download.oracle.com/javase/6/docs/api/java/lang/IllegalArgumentException.html?is-external=true>|-
    - if the|interfaces|argument is null, the instance does not
    implement all the specified interfaces, *or there is not an
    accessible default constructor.*

I cannot recall why we need to throw an IllegalArgumentException when
there is not an accessible default constructor in the object that we
want to create a contextual object proxy for. Does anyone remember the
reason why? If not, I am planning to rewrite it to:

| IllegalArgumentException
<http://download.oracle.com/javase/6/docs/api/java/lang/IllegalArgumentException.html?is-external=true>|-
- if the|interfaces|argument is null or the instance does not implement
all the specified interfaces.

Regards
Anthony