Skip to content

Commit

Permalink
Removal of deprecated APIs: Bean.isNullable()
Browse files Browse the repository at this point in the history
  • Loading branch information
manovotn committed Apr 27, 2021
1 parent 3fa7398 commit 542a02d
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 18 deletions.
14 changes: 0 additions & 14 deletions api/src/main/java/jakarta/enterprise/inject/spi/Bean.java
Original file line number Diff line number Diff line change
Expand Up @@ -49,18 +49,4 @@ public interface Bean<T> extends Contextual<T>, BeanAttributes<T> {
* @return the set of {@linkplain InjectionPoint injection points} of the bean
*/
public Set<InjectionPoint> getInjectionPoints();

/**
* <p>
* Determines if {@link Contextual#create(CreationalContext)} sometimes return a null value.
* </p>
*
* <p>
* As of CDI 1.1 this method is deprecated and can safely always return false.
* </p>
*
* @return <code>true</code> if the {@code create()} method may return a null value, and <code>false</code> otherwise
*/
public boolean isNullable();

}
Original file line number Diff line number Diff line change
Expand Up @@ -552,7 +552,7 @@ public interface BeanManager {
*
* @param <T> the type
* @param attributes a {@link BeanAttributes} which determines the bean types, qualifiers, scope, name and stereotypes of
* the returned {@link Bean}, and the return values of {@link Bean#isAlternative()} and {@link Bean#isNullable()}
* the returned {@link Bean}, and the return value of {@link Bean#isAlternative()}
* @param beanClass a class, which determines the return value of {@link Bean#getBeanClass()}
* @param injectionTargetFactory an {@link InjectionTargetFactory}, used to obtain an {@link InjectionTarget}
* @return a container provided implementation of {@link Bean}
Expand All @@ -576,7 +576,7 @@ public <T> Bean<T> createBean(BeanAttributes<T> attributes, Class<T> beanClass,
* @param <T> the type
* @param <X> the type of the declaring bean
* @param attributes a {@link BeanAttributes} which determines the bean types, qualifiers, scope, name and stereotypes of
* the returned {@link Bean}, and the return values of {@link Bean#isAlternative()} and {@link Bean#isNullable()}
* the returned {@link Bean}, and the return value of {@link Bean#isAlternative()}
* @param beanClass a class, which determines the return value of <code>Bean.getClass()</code>
* @param producerFactory a {@link ProducerFactory}, used to obtain a {@link Producer}
* @return a container provided implementation of {@link Bean}
Expand Down
2 changes: 0 additions & 2 deletions spec/src/main/asciidoc/core/spi.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,11 @@ The interface `jakarta.enterprise.inject.spi.Bean` defines everything the contai
public interface Bean<T> extends Contextual<T>, BeanAttributes<T> {
public Class<?> getBeanClass();
public Set<InjectionPoint> getInjectionPoints();
public boolean isNullable();
}
----

* `getBeanClass()` returns the bean class of the managed bean or of the bean that declares the producer method or field.
* `getInjectionPoints()` returns a set of `InjectionPoint` objects, defined in <<injection_point>>, representing injection points of the bean, that will be validated by the container at initialization time.
* `isNullable()` is deprecated in CDI 1.1 and should be ignored by the container.

Note that implementations of `Bean` must also implement the inherited operations defined by the `Contextual` interface defined in <<contextual>>.

Expand Down

0 comments on commit 542a02d

Please sign in to comment.