Skip to content

Commit 0a1261d

Browse files
authored
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.
1 parent d205e10 commit 0a1261d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

core/src/main/java/hudson/slaves/NodeProvisioner.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ private void update() {
251251
LOGGER.log(Level.INFO,
252252
"{0} provisioning successfully completed. "
253253
+ "We have now {1,number,integer} computer(s)",
254-
new Object[]{f.displayName, jenkins.getComputers().length});
254+
new Object[]{f.displayName, jenkins.getComputersCollection().size()});
255255
fireOnCommit(f, node);
256256
} catch (IOException e) {
257257
LOGGER.log(Level.WARNING,

0 commit comments

Comments
 (0)