Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
4.5.1
-
None
Description
Consider following configuration
@DataSourceDefinition(
...
properties =
)
The value of the property "validationQuery" ends up as "= SELECT 1" which is wrong.
I tracked down this code in org.apache.openejb.config.AnnotationDeployer#buildDataSourceDefinition
...
for (String s : d.properties()) {
final String key = s.substring(0, s.indexOf('='));
final String value = s.substring(s.indexOf('='));
dataSource.property(key, value);
}
The beginIndex of substring is inclusive so the equals sign is included. Perhaps you can also add some trimming of whitespaces to the code