Skip to content

Commit 1a73545

Browse files
committed
Fixed NPE for missing WebApplicationContext
1 parent 11e931d commit 1a73545

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

‎integration-spring/src/main/java/com/ocpsoft/rewrite/spring/SpringExpressionLanguageProvider.java‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,8 @@ public EvaluationContext getEvaluationContext() {
106106
}
107107

108108
// the AutowireCapableBeanFactory usually implements ConfigurableListableBeanFactory
109-
if (beanFactory == null && applicationContext.getAutowireCapableBeanFactory() instanceof ConfigurableBeanFactory) {
109+
if (beanFactory == null && applicationContext != null
110+
&& applicationContext.getAutowireCapableBeanFactory() instanceof ConfigurableBeanFactory) {
110111
beanFactory = (ConfigurableBeanFactory) applicationContext.getAutowireCapableBeanFactory();
111112
}
112113

0 commit comments

Comments
 (0)