YARN-10689. Fix the finding bugs in extractFloatValueFromWeightConfig. (#2760)
Signed-off-by: Akira Ajisaka <aajisaka@apache.org>
This commit is contained in:
parent
299b8062f1
commit
e9c98548e9
@ -775,7 +775,7 @@ private float extractFloatValueFromWeightConfig(String configureValue) {
|
|||||||
if (!configuredWeightAsCapacity(configureValue)) {
|
if (!configuredWeightAsCapacity(configureValue)) {
|
||||||
return -1f;
|
return -1f;
|
||||||
} else {
|
} else {
|
||||||
return Float.valueOf(
|
return Float.parseFloat(
|
||||||
configureValue.substring(0, configureValue.indexOf(WEIGHT_SUFFIX)));
|
configureValue.substring(0, configureValue.indexOf(WEIGHT_SUFFIX)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user