Skip to content

Commit d7e718c

Browse files
committed
More changes from PR jenkinsci#67
Removed unnecessary cast. Removed unnecessary import.
1 parent acc667f commit d7e718c

File tree

3 files changed

+3
-4
lines changed

3 files changed

+3
-4
lines changed

src/main/java/org/jenkinsci/plugins/vsphere/builders/ReconfigureCpu.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
package org.jenkinsci.plugins.vsphere.builders;
1616

1717
import hudson.*;
18-
import hudson.Extension;
1918
import hudson.model.AbstractBuild;
2019
import hudson.model.BuildListener;
2120
import hudson.model.Run;

src/main/java/org/jenkinsci/plugins/vsphere/tools/CloudProvisioningRecord.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ private boolean hasFiniteCapacity() {
123123

124124
private double calcFullness() {
125125
final int maxToProvision = calcMaxToProvision();
126-
return ((double) calcCurrentCommitment()) / (double) maxToProvision;
126+
return calcCurrentCommitment() / (double) maxToProvision;
127127
}
128128

129129
boolean hasCapacityForMore() {

src/test/java/org/jenkinsci/plugins/vsphere/tools/CloudProvisioningAlgorithmTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -323,8 +323,8 @@ private static vSphereCloudSlaveTemplate stubTemplate(String prefix, int templat
323323
private static String toHexString(byte[] bytes) {
324324
final StringBuilder s = new StringBuilder("0x");
325325
for (final byte b : bytes) {
326-
final int highDigit = (((int) b) >> 8) & 15;
327-
final int lowDigit = ((int) b) & 15;
326+
final int highDigit = (b >> 8) & 15;
327+
final int lowDigit = b & 15;
328328
s.append(Integer.toString(highDigit, 16));
329329
s.append(Integer.toString(lowDigit, 16));
330330
}

0 commit comments

Comments
 (0)