-
-
Notifications
You must be signed in to change notification settings - Fork 271
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
[bug] System properties are only read if configuration file exists in class path #538
Comments
Thank you for your thorough report. I'm am currently out of the country for vacation and will look into this once I come back. Stay tuned! |
I made a simple repro. Just run the test.sh (or read it) Output is: !!!!! Running without empty properties file !!!! !!!!! Running with empty properties file !!!!! |
…, in the absence of a properties file (also env properties were loading incorrectly)
…er (used for testing env properties)
Fix released in v8.12.0. |
…er (used for testing env properties)
Actual behaviour
Configuration via system properties is ignored as long as there is no "simplejavamail.properties" file in the class path.
Expected behaviour
Configuration via system properties is possible, even without a properties file.
Why it happens
This is because the
ConfigLoader loadProperties
that gets called in the static init block does NOT callreadProperties
.readProperties
is where the system properties are used if set.The
loadProperties
variant for InputStream does callreadProperties
, but is itself only called if theloadProperties
for String finds a file on the class path.Ergo to enable system properties you need to add a file to the class path.
How to reproduce
OperationConfig isVerifyingIdentity
should be false, but is trueThe text was updated successfully, but these errors were encountered: