title: AccessController.doPrivileged
body: <p>I am trying to figure out what some legacy code is doing. What exactly is this line doing, and why would I need it this way?</p>
  
  <pre><code>String lineSeparator = (String) java.security.AccessController.doPrivileged(
         new sun.security.action.GetPropertyAction("line.separator")); 
  </code></pre>
  
  <p>I found it in the logger implementation of the web/ejb application running on Weblogic 8. There are no special security policies enabled as far as I know. (I do not like imports from sun.* packages, so I want to get rid of this line ;-)</p>