This is an automated email from the ASF dual-hosted git repository.

dpavlov pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ignite-teamcity-bot.git


The following commit(s) were added to refs/heads/master by this push:
     new 2736e7f  No locks mode: double check removed as not needed
2736e7f is described below

commit 2736e7fbb9b17f7a7014fcf3422a906bd7008fe5
Author: Dmitriy Pavlov <[email protected]>
AuthorDate: Tue Sep 18 15:20:56 2018 +0300

    No locks mode: double check removed as not needed
---
 .../org/apache/ignite/ci/IgnitePersistentTeamcity.java | 18 ++++++++----------
 1 file changed, 8 insertions(+), 10 deletions(-)

diff --git 
a/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/IgnitePersistentTeamcity.java
 
b/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/IgnitePersistentTeamcity.java
index 75c8031..d3b038d 100644
--- 
a/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/IgnitePersistentTeamcity.java
+++ 
b/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/IgnitePersistentTeamcity.java
@@ -277,24 +277,22 @@ public class IgnitePersistentTeamcity implements 
IAnalyticsEnabledTeamcity, ITea
         if (persistedBuilds != null
                 && (persistedBuilds.isAgeLessThanSecs(seconds)
                 && (cnt == null || 
persistedBuilds.hasCounterGreaterThan(cnt)))) {
-            List<BuildRef> data = persistedBuilds.getData();
-
             ObjectInterner.internFields(persistedBuilds);
 
-            return data;
+            return persistedBuilds.getData();
         }
 
         Lock lock = lockBuildHistEntry(cache, key);
 
         try {
-            if (persistedBuilds != null
-                    && (persistedBuilds.isAgeLessThanSecs(seconds)
-                    && (cnt == null || 
persistedBuilds.hasCounterGreaterThan(cnt)))) {
-                List<BuildRef> data = persistedBuilds.getData();
-
-                ObjectInterner.internFields(persistedBuilds);
+            if (!noLocks) {
+                if (persistedBuilds != null
+                        && (persistedBuilds.isAgeLessThanSecs(seconds)
+                        && (cnt == null || 
persistedBuilds.hasCounterGreaterThan(cnt)))) {
+                    ObjectInterner.internFields(persistedBuilds);
 
-                return data;
+                    return persistedBuilds.getData();
+                }
             }
 
             //todo sinceBuild:(number:) // --todo -10 build numbers

Reply via email to