svendiedrichsen / jollyday

Jollyday - A holiday API
Other
189 stars 114 forks source link

Use System.getProperty instead of System.getProperties #62

Closed kkofler closed 6 years ago

kkofler commented 6 years ago

Use System.getProperty to get a specific property instead of first retrieving all properties with System.getProperties() only to read one property out of it.

This is more friendly to security managers: instead of requiring the permission to read and even write all properties ("java.util.PropertyPermission" "*" "read,write"), the policy only needs to allow reading a specific property, which is much more secure.

Depending on the JVM implementation, System.getProperty can also be more efficient.

coveralls commented 6 years ago

Coverage Status

Coverage decreased (-0.04%) to 82.696% when pulling 833cf230b05f3887973aefaaa1aa5c93b83ba7bb on kkofler:security-policy-friendliness into 8c1c5649ee69befe042f717d250e1268c445c0f7 on svendiedrichsen:master.

kkofler commented 6 years ago

(The force-push changed the From address to my work address, I accidentally had the wrong address set.)

svendiedrichsen commented 6 years ago

@kkofler Good point. Thanks very much for the PR.

kkofler commented 6 years ago

Are you going to do a new release soon?

svendiedrichsen commented 6 years ago

I just made one.

kkofler commented 6 years ago

Great, thanks!