You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
The BaseLoader.createValue method is where trimming is supposed to happen for properties, but it is not happening for non-String Properties. This perhaps due to bad variable names and a bad precedent set in some ValueTypes, which were performing trimming in their parse method (even though the values are supposed to be trimmed when passed).
This seems like a huge bug, but it actually doesn't show up for the most part:
java.util.Properties trims leading spaces and IDEs generally remove trailing spaces
Env vars and Sys Props generally don't have extra whitespace (but could)
JNDI values generally don't have extra whitespace
Some ValueTypes do trim String values:
BolType
FlagType
To Reproduce
Create a property file with trailing whitespace on a non-String value - it will report a loader problem like this:
The string '80 ' could not be converted to type Integer
Expected behavior / Actual behavior
Non-String values should always be trimmed with the trimmer assigned to the Property.
The text was updated successfully, but these errors were encountered:
Describe the bug
The BaseLoader.createValue method is where trimming is supposed to happen for properties, but it is not happening for non-String Properties. This perhaps due to bad variable names and a bad precedent set in some ValueTypes, which were performing trimming in their parse method (even though the values are supposed to be trimmed when passed).
This seems like a huge bug, but it actually doesn't show up for the most part:
Some ValueTypes do trim String values:
To Reproduce
Create a property file with trailing whitespace on a non-String value - it will report a loader problem like this:
Expected behavior / Actual behavior
Non-String values should always be trimmed with the trimmer assigned to the Property.
The text was updated successfully, but these errors were encountered: