continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From c...@apache.org
Subject svn commit: r929101 - /continuum/trunk/continuum-core/src/main/java/org/apache/continuum/builder/distributed/manager/DefaultDistributedBuildManager.java
Date Tue, 30 Mar 2010 12:07:00 GMT
Author: ctan
Date: Tue Mar 30 12:07:00 2010
New Revision: 929101

URL: http://svn.apache.org/viewvc?rev=929101&view=rev
Log:
eliminate multiple calls to method

Modified:
    continuum/trunk/continuum-core/src/main/java/org/apache/continuum/builder/distributed/manager/DefaultDistributedBuildManager.java

Modified: continuum/trunk/continuum-core/src/main/java/org/apache/continuum/builder/distributed/manager/DefaultDistributedBuildManager.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-core/src/main/java/org/apache/continuum/builder/distributed/manager/DefaultDistributedBuildManager.java?rev=929101&r1=929100&r2=929101&view=diff
==============================================================================
--- continuum/trunk/continuum-core/src/main/java/org/apache/continuum/builder/distributed/manager/DefaultDistributedBuildManager.java
(original)
+++ continuum/trunk/continuum-core/src/main/java/org/apache/continuum/builder/distributed/manager/DefaultDistributedBuildManager.java
Tue Mar 30 12:07:00 2010
@@ -1202,15 +1202,19 @@ public class DefaultDistributedBuildMana
     private boolean hasBuildagentGroup( Map<Integer, Integer> projectsAndBuildDefinitionsMap
)
         throws ContinuumException
     {
-        return getBuildAgentGroup( projectsAndBuildDefinitionsMap ) != null &&
-               getBuildAgentGroup( projectsAndBuildDefinitionsMap ).getName().length() >
0 ? true : false;
+        BuildAgentGroupConfiguration buildAgentGroup = getBuildAgentGroup( projectsAndBuildDefinitionsMap
);
+
+        return buildAgentGroup != null &&
+               buildAgentGroup.getName().length() > 0 ? true : false;
     }
     
     private boolean hasBuildagentInGroup( Map<Integer, Integer> projectsAndBuildDefinitionsMap
)
         throws ContinuumException
     {
-        return getBuildAgentGroup( projectsAndBuildDefinitionsMap ).getBuildAgents() != null
&&
-               getBuildAgentGroup( projectsAndBuildDefinitionsMap ).getBuildAgents().size()
> 0 ? true : false;
+        BuildAgentGroupConfiguration buildAgentGroup = getBuildAgentGroup( projectsAndBuildDefinitionsMap
);
+
+        return buildAgentGroup != null &&
+               buildAgentGroup.getBuildAgents().size() > 0 ? true : false;
     }
 
     // for unit testing



Mime
View raw message