mirror of
https://github.com/spring-projects/spring-framework
synced 2026-06-08 17:33:33 +00:00
Add script after setting scripts in RsrcDbPopultr
Prior to this commit it was impossible to add additional scripts to a ResourceDatabasePopulator after setScripts() had been invoked. This commit fixes this by ensuring that the internal scripts list continues to be modifiable when setScripts() is invoked. Issue: SPR-11691
This commit is contained in:
+2
-1
@@ -133,7 +133,8 @@ public class ResourceDatabasePopulator implements DatabasePopulator {
|
||||
*/
|
||||
public void setScripts(Resource... scripts) {
|
||||
assertContentsOfScriptArray(scripts);
|
||||
this.scripts = Arrays.asList(scripts);
|
||||
// Ensure that the list is modifiable
|
||||
this.scripts = new ArrayList<Resource>(Arrays.asList(scripts));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user