Skip to content

Commit

Permalink
Formal null safety for exception message through String.valueOf
Browse files Browse the repository at this point in the history
  • Loading branch information
jhoeller committed Jun 28, 2024
1 parent 61894af commit 61adf2d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -853,7 +853,8 @@ protected ResolvableType getTypeForFactoryBean(String beanName, RootBeanDefiniti
}
}
catch (IllegalArgumentException ex) {
throw new BeanDefinitionStoreException(mbd.getResourceDescription(), beanName, ex.getMessage());
throw new BeanDefinitionStoreException(mbd.getResourceDescription(), beanName,
String.valueOf(ex.getMessage()));
}

// For instance supplied beans, try the target type and bean class immediately
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1723,7 +1723,8 @@ protected ResolvableType getTypeForFactoryBean(String beanName, RootBeanDefiniti
}
}
catch (IllegalArgumentException ex) {
throw new BeanDefinitionStoreException(mbd.getResourceDescription(), beanName, ex.getMessage());
throw new BeanDefinitionStoreException(mbd.getResourceDescription(), beanName,
String.valueOf(ex.getMessage()));
}

if (allowInit && mbd.isSingleton()) {
Expand Down

0 comments on commit 61adf2d

Please sign in to comment.