Fix the conversion problem of float type in ConfigInitializer. (#6974)

This commit is contained in:
zifeihan 2021-05-20 05:50:16 +08:00 committed by GitHub
parent bb590daba9
commit 104f398b5b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View File

@ -27,6 +27,7 @@ Release Notes.
* Add `okhttp-4.x` plugin.
* Fix NPE when thrift field is nested in plugin `thrift`
* Fix possible NullPointerException in agent's ES plugin.
* Fix the conversion problem of float type in ConfigInitializer.
#### OAP-Backend
* BugFix: filter invalid Envoy access logs whose socket address is empty.

View File

@ -112,7 +112,7 @@ public class ConfigInitializer {
} else if (boolean.class.equals(type) || Boolean.class.equals(type)) {
result = Boolean.valueOf(value);
} else if (float.class.equals(type) || Float.class.equals(type)) {
result = Boolean.valueOf(value);
result = Float.valueOf(value);
} else if (double.class.equals(type) || Double.class.equals(type)) {
result = Double.valueOf(value);
} else if (List.class.equals(type)) {