mirror of https://github.com/jenkinsci/jenkins.git
use the collection directly (#10917)
getComputers() calls getComputerCollection() before using streams to sort the entries, to put the results into an array, all just to get the number of computers. just use the collection directly and call size() to avoid the overhead.
This commit is contained in:
parent
d205e10bd6
commit
0a1261de8f
|
@ -251,7 +251,7 @@ public class NodeProvisioner {
|
|||
LOGGER.log(Level.INFO,
|
||||
"{0} provisioning successfully completed. "
|
||||
+ "We have now {1,number,integer} computer(s)",
|
||||
new Object[]{f.displayName, jenkins.getComputers().length});
|
||||
new Object[]{f.displayName, jenkins.getComputersCollection().size()});
|
||||
fireOnCommit(f, node);
|
||||
} catch (IOException e) {
|
||||
LOGGER.log(Level.WARNING,
|
||||
|
|
Loading…
Reference in New Issue