Skip to content

Commit

Permalink
Add default implementation of OM#getDeclaringBean()
Browse files Browse the repository at this point in the history
  • Loading branch information
manovotn authored and Ladicek committed Dec 8, 2021
1 parent 12047ee commit b22d391
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,16 @@ public interface ObserverMethod<T> extends Prioritized {
* For synthetic observers, the return value is undefined.
* </p>
*
* <p>
* For the sake of compatibility with existing custom {@link ObserverMethod} implementations, this method by default
* returns {@code null}.
* </p>
*
* @return the declaring {@linkplain Bean bean}
*/
public Bean<?> getDeclaringBean();
default Bean<?> getDeclaringBean() {
return null;
}

/**
* Obtains the {@linkplain jakarta.enterprise.event observed event type}.
Expand Down

0 comments on commit b22d391

Please sign in to comment.