accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From medi...@apache.org
Subject svn commit: r1382386 - /accumulo/trunk/core/src/main/java/org/apache/accumulo/core/conf/SiteConfiguration.java
Date Sun, 09 Sep 2012 00:49:39 GMT
Author: medined
Date: Sun Sep  9 00:49:39 2012
New Revision: 1382386

URL: http://svn.apache.org/viewvc?rev=1382386&view=rev
Log:
ACCUMULO-755: Run findbugs (added synchronized to static methods that initialize static variables).

Modified:
    accumulo/trunk/core/src/main/java/org/apache/accumulo/core/conf/SiteConfiguration.java

Modified: accumulo/trunk/core/src/main/java/org/apache/accumulo/core/conf/SiteConfiguration.java
URL: http://svn.apache.org/viewvc/accumulo/trunk/core/src/main/java/org/apache/accumulo/core/conf/SiteConfiguration.java?rev=1382386&r1=1382385&r2=1382386&view=diff
==============================================================================
--- accumulo/trunk/core/src/main/java/org/apache/accumulo/core/conf/SiteConfiguration.java
(original)
+++ accumulo/trunk/core/src/main/java/org/apache/accumulo/core/conf/SiteConfiguration.java
Sun Sep  9 00:49:39 2012
@@ -35,7 +35,7 @@ public class SiteConfiguration extends A
     SiteConfiguration.parent = parent;
   }
   
-  public static SiteConfiguration getInstance(AccumuloConfiguration parent) {
+  synchronized public static SiteConfiguration getInstance(AccumuloConfiguration parent)
{
     if (instance == null) {
       instance = new SiteConfiguration(parent);
       ConfigSanityCheck.validate(instance);
@@ -43,7 +43,7 @@ public class SiteConfiguration extends A
     return instance;
   }
   
-  private static Configuration getXmlConfig() {
+  synchronized private static Configuration getXmlConfig() {
     String configFile = System.getProperty("org.apache.accumulo.config.file", "accumulo-site.xml");
     if (xmlConfig == null) {
       xmlConfig = new Configuration(false);



Mime
View raw message