YARN-10689. Fix the finding bugs in extractFloatValueFromWeightConfig. (#2760)

Signed-off-by: Akira Ajisaka <aajisaka@apache.org>
This commit is contained in:
zhuqi 2021-03-16 12:50:29 +08:00 committed by GitHub
parent 299b8062f1
commit e9c98548e9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -775,7 +775,7 @@ public class CapacitySchedulerConfiguration extends ReservationSchedulerConfigur
if (!configuredWeightAsCapacity(configureValue)) {
return -1f;
} else {
return Float.valueOf(
return Float.parseFloat(
configureValue.substring(0, configureValue.indexOf(WEIGHT_SUFFIX)));
}
}