Improve comment handling in ResourceDatabasePopulator [SPR-9261] #13899
Labels
in: core
Issues in core modules (aop, beans, core, context, expression)
status: duplicate
A duplicate of another issue
type: enhancement
A general enhancement
spring-projects-issues commentedMar 22, 2012
•
edited
Lukas Kuster opened SPR-9261 and commented
The ResourceDatabasePopulator currently strips comments from an SQL file, but only if they start at the beginning of the line. If they are indented, or if they are placed on the same line after an SQL statement, they are left in the script and can be wrapped in with the following SQL statement, depending on the statement separator used.
E.g. in the following script, the comments at lines 2 and 3 would both be wrapped in with the insert statement on line 4, causing it to not be executed properly.
With the attached patch the ResourceDatabasePopulator removes all comments from an SQL file. A unit test illustrating the behaviour is included.
Affects: 3.1.1
Attachments:
Issue Links:
The text was updated successfully, but these errors were encountered: