maven-scm-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r952829 - in /maven/scm/trunk/maven-scm-providers: maven-scm-providers-cvs/maven-scm-provider-cvs-commons/src/main/java/org/apache/maven/scm/provider/cvslib/util/ maven-scm-providers-git/maven-scm-provider-git-commons/src/main/java/org/apac...
Date Tue, 08 Jun 2010 21:19:56 GMT
Author: olamy
Date: Tue Jun  8 21:19:56 2010
New Revision: 952829

URL: http://svn.apache.org/viewvc?rev=952829&view=rev
Log:
[SCM-535] Cache Settings in SvnUtil
apply similar patch to CvsUtil and GitUtil.

Modified:
    maven/scm/trunk/maven-scm-providers/maven-scm-providers-cvs/maven-scm-provider-cvs-commons/src/main/java/org/apache/maven/scm/provider/cvslib/util/CvsUtil.java
    maven/scm/trunk/maven-scm-providers/maven-scm-providers-git/maven-scm-provider-git-commons/src/main/java/org/apache/maven/scm/provider/git/util/GitUtil.java

Modified: maven/scm/trunk/maven-scm-providers/maven-scm-providers-cvs/maven-scm-provider-cvs-commons/src/main/java/org/apache/maven/scm/provider/cvslib/util/CvsUtil.java
URL: http://svn.apache.org/viewvc/maven/scm/trunk/maven-scm-providers/maven-scm-providers-cvs/maven-scm-provider-cvs-commons/src/main/java/org/apache/maven/scm/provider/cvslib/util/CvsUtil.java?rev=952829&r1=952828&r2=952829&view=diff
==============================================================================
--- maven/scm/trunk/maven-scm-providers/maven-scm-providers-cvs/maven-scm-provider-cvs-commons/src/main/java/org/apache/maven/scm/provider/cvslib/util/CvsUtil.java
(original)
+++ maven/scm/trunk/maven-scm-providers/maven-scm-providers-cvs/maven-scm-provider-cvs-commons/src/main/java/org/apache/maven/scm/provider/cvslib/util/CvsUtil.java
Tue Jun  8 21:19:56 2010
@@ -40,12 +40,25 @@ public class CvsUtil
 
     private static File settingsDirectory = DEFAULT_SETTINGS_DIRECTORY;
 
+    
+    public static Settings settings;;
+    
     private CvsUtil()
     {
+        // no op
     }
 
     public static Settings getSettings()
     {
+        if ( settings == null )
+        {
+            settings = readSettings();
+        }
+        return settings;
+    }
+    
+    public static Settings readSettings()
+    {
         File settingsFile = getSettingsFile();
 
         if ( settingsFile.exists() )

Modified: maven/scm/trunk/maven-scm-providers/maven-scm-providers-git/maven-scm-provider-git-commons/src/main/java/org/apache/maven/scm/provider/git/util/GitUtil.java
URL: http://svn.apache.org/viewvc/maven/scm/trunk/maven-scm-providers/maven-scm-providers-git/maven-scm-provider-git-commons/src/main/java/org/apache/maven/scm/provider/git/util/GitUtil.java?rev=952829&r1=952828&r2=952829&view=diff
==============================================================================
--- maven/scm/trunk/maven-scm-providers/maven-scm-providers-git/maven-scm-provider-git-commons/src/main/java/org/apache/maven/scm/provider/git/util/GitUtil.java
(original)
+++ maven/scm/trunk/maven-scm-providers/maven-scm-providers-git/maven-scm-provider-git-commons/src/main/java/org/apache/maven/scm/provider/git/util/GitUtil.java
Tue Jun  8 21:19:56 2010
@@ -40,12 +40,24 @@ public class GitUtil
 
     private static File settingsDirectory = DEFAULT_SETTINGS_DIRECTORY;
 
+    private static Settings settings;
+    
     private GitUtil()
     {
+        // no op
     }
 
     public static Settings getSettings()
     {
+        if (settings == null)
+        {
+            settings = readSettings();
+        }
+        return settings;
+    }
+    
+    public static Settings readSettings()
+    {
         File settingsFile = getSettingsFile();
 
         if ( settingsFile.exists() )



Mime
View raw message