DateTimeZone should load it's provider in an AccessController.doPrivileged block
See original GitHub issueIn elasticsearch we run into a testing issue where due to security manager restrictions the default providers could not be loaded. https://github.com/elastic/elasticsearch/issues/14524 The problem here is really that we can’t grant the jar it’s needed permissions since it doesn’t use a AccessController.doPrivileged block
to load the privider in
https://github.com/JodaOrg/joda-time/blob/master/src/main/java/org/joda/time/DateTimeZone.java#L483 I am not sure if there are other places where stuff like this is loaded but there might be
Issue Analytics
- State:
- Created 8 years ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
AccessController (Java Platform SE 8 ) - Oracle Help Center
When making access control decisions, the checkPermission method stops checking if it reaches a caller that was marked as "privileged" via a doPrivileged...
Read more >[CI failure] DateHistogramTests, "The datetime zone id 'CET' is ...
Looking at DateTimeZone#forID, it seems like Joda couldn't look up the zone from the internal Provider class that Joda loads at startup and ......
Read more >java - When should AccessController.doPrivileged() be used?
Agree with Suraj's answer, but thought I'd add a specific example where I've required the use of a privileged block.
Read more >SEC51-J. Minimize privileged code
This compliant solution moves the call to System.loadLibrary() outside the doPrivileged() block. Doing so allows unprivileged code to perform preliminary ...
Read more >Diff - platform/libcore - Google Git
Use them. // We have to be able to fetch its value, even if it is private - AccessController.doPrivileged(new PriviAction<Object>(f)); + f.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Done
Thanks @jodastephen!