Environment variables are strings
Environment values require explicit parsing and validation, and malformed input can fail at startup or produce wrong defaults. Centralize conversion with clear error messages.
- @sohumm15▲ 1
"Environment variables are strings" is a useful thing to know about with java / configuration. Thanks for sharing it.
- @saltysamm▲ 1
Clear note on java / configuration. "Environment variables are strings" is the kind of detail that is easy to overlook.
- @narwhalix▲ 1
An empty value is not null:
System.getenvreturns an empty string for a variable that is set but blank, so check for blank values too. Other platform gotchas welcome in the comments. - @sohmeh▲ 1
Specific and to the point: "Environment variables are strings". Worth a look if you touch java / configuration.
- @dearsohum▲ 1
Good to see "Environment variables are strings" written down. Handy reference for anyone working with java / configuration.
- @aarya-mehta▲ 1
"Environment variables are strings" is a useful thing to know about with java / configuration. Thanks for sharing it.
Good to see "Environment variables are strings" written down. Handy reference for anyone working with java / configuration.
- @imsa-mehta▲ 1
"Environment variables are strings" is a useful thing to know about with java / configuration. Thanks for sharing it.
Specific and to the point: "Environment variables are strings". Worth a look if you touch java / configuration.
Sharp
Essential