mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-07 01:54:22 +00:00
[DS-2907] Fix incorrect lazy initialization and update of static field in SpiderDetector & flyway
This commit is contained in:
@@ -99,7 +99,7 @@ public class SpiderDetector {
|
||||
* private loader to populate the table from files.
|
||||
*/
|
||||
|
||||
private static void loadSpiderIpAddresses() {
|
||||
private synchronized static void loadSpiderIpAddresses() {
|
||||
|
||||
if (table == null) {
|
||||
table = new IPTable();
|
||||
|
@@ -368,7 +368,7 @@ public class DatabaseUtils
|
||||
* DataSource object initialized by DatabaseManager
|
||||
* @return initialized Flyway object
|
||||
*/
|
||||
private static Flyway setupFlyway(DataSource datasource)
|
||||
private synchronized static Flyway setupFlyway(DataSource datasource)
|
||||
{
|
||||
if (flywaydb==null)
|
||||
{
|
||||
|
Reference in New Issue
Block a user