Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ public <T> AbstractObjectAssert<?, T> getBean(Class<T> type) {
* given type
*/
@CheckReturnValue
public <T> AbstractObjectAssert<?, T> getBean(Class<T> type, Scope scope) {
public <T> AbstractObjectAssert<?, @Nullable T> getBean(Class<T> type, Scope scope) {
Assert.notNull(scope, "'scope' must not be null");
if (this.startupFailure != null) {
throwAssertionError(
Expand Down Expand Up @@ -334,7 +334,7 @@ private boolean isPrimary(String name, Scope scope) {
* @throws AssertionError if the application context did not start
*/
@CheckReturnValue
public AbstractObjectAssert<?, Object> getBean(String name) {
public AbstractObjectAssert<?, @Nullable Object> getBean(String name) {
if (this.startupFailure != null) {
throwAssertionError(
contextFailedToStartWhenExpecting(this.startupFailure, "to contain a bean of name:%n <%s>", name));
Expand Down Expand Up @@ -362,7 +362,7 @@ public AbstractObjectAssert<?, Object> getBean(String name) {
*/
@SuppressWarnings("unchecked")
@CheckReturnValue
public <T> AbstractObjectAssert<?, T> getBean(String name, Class<T> type) {
public <T> AbstractObjectAssert<?, @Nullable T> getBean(String name, Class<T> type) {
if (this.startupFailure != null) {
throwAssertionError(contextFailedToStartWhenExpecting(this.startupFailure,
"to contain a bean of name:%n <%s> (%s)", name, type));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ public ConfigurationPropertyCaching getCaching() {
return getCache().getSystemEnvironmentProperty(name);
}

@SuppressWarnings("NullAway") // https://github.com/uber/NullAway/issues/1578
@Override
public Stream<ConfigurationPropertyName> stream() {
@Nullable ConfigurationPropertyName[] names = getConfigurationPropertyNames();
Expand Down
Loading