Details
-
Type:
Bug
-
Status: Resolved
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 2.15.2
-
Component/s: camel-jasypt, camel-spring
-
Labels:None
-
Estimated Complexity:Novice
Description
After updating from 2.15.1 to 2.15.2 injecting property values handled by Jasypt via BridgePropertyPlaceholderConfigurer is not supporting default values any more.
Code like
@Value("${testProperty:test}") private String test;
is leading to NullPointerException:
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'test': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private java.lang.String org.apache.camel.component.jasypt.Test.test; nested exception is java.lang.NullPointerException
at java.util.regex.Matcher.getTextLength(Matcher.java:1234)
at java.util.regex.Matcher.reset(Matcher.java:308)
at java.util.regex.Matcher.<init>(Matcher.java:228)
at java.util.regex.Pattern.matcher(Pattern.java:1088)
at org.apache.camel.component.jasypt.JasyptPropertiesParser.parseProperty(JasyptPropertiesParser.java:56)
at org.apache.camel.spring.spi.BridgePropertyPlaceholderConfigurer.resolvePlaceholder(BridgePropertyPlaceholderConfigurer.java:121)
at org.springframework.beans.factory.config.PropertyPlaceholderConfigurer.resolvePlaceholder(PropertyPlaceholderConfigurer.java:162)