Skip to content

Commit

Permalink
Fix Javadoc for createInstance validity
Browse files Browse the repository at this point in the history
The spec and TCK assert that BeanContainer.createInstance() must not be
called before the AfterDeploymentValidation event is fired.

Correct some Javadoc which was inconsistent.

Signed-off-by: Andrew Rouse <anrouse@uk.ibm.com>
  • Loading branch information
Azquelt authored and Ladicek committed Aug 14, 2023
1 parent 37afd0e commit bbfd0c4
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -241,10 +241,6 @@ public interface BeanContainer {
* or, in the Jakarta EE environment, the Jakarta EE component from whose JNDI environment namespace the
* <code>BeanContainer</code> was obtained, according to the rules of typesafe resolution.
* <p>
* Note that when called during invocation of an {@link AfterBeanDiscovery} event observer,
* the <code>Instance</code> returned by this method will only give access to instances of beans discovered by the container
* before the {@link AfterBeanDiscovery} event is fired.
* <p>
* Instances of dependent scoped beans obtained with this <code>Instance</code> must be explicitly destroyed by calling {@link Instance#destroy(Object)}
* <p>
* If no qualifier is passed to {@link Instance#select} method, the <code>@Default</code> qualifier is assumed.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,12 @@
* <li>{@link #resolveInterceptors(InterceptionType, java.lang.annotation.Annotation...)},</li>
* <li>{@link #resolveObserverMethods(Object, java.lang.annotation.Annotation...)},</li>
* <li>{@link #validate(InjectionPoint)},</li>
* <li>{@link #createInstance()}</li>
* </ul>
* <p>
* and the following operations must not be called before the {@link AfterDeploymentValidation} event is fired:
* </p>
* <ul>
* <li>{@link #createInstance()}</li>
* <li>{@link #getReference(Bean, java.lang.reflect.Type, CreationalContext)},</li>
* <li>{@link #getInjectableReference(InjectionPoint, CreationalContext)},</li>
* </ul>
Expand Down

0 comments on commit bbfd0c4

Please sign in to comment.