[DS-2907] Fix incorrect lazy initialization and update of static field in SpiderDetector & flyway

This commit is contained in:
KevinVdV
2015-11-20 12:25:24 +01:00
parent 440c26c861
commit b2f275c794
2 changed files with 2 additions and 2 deletions

View File

@@ -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();

View File

@@ -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)
{