title: Why not DriverManager.getConnection(String url, String user, char[] password)?
body: <p>We know it's a good practice to prefer char[] over java.lang.String to store passwords. That's for the following two reasons (as I have read):</p>
  
  <ol>
  <li>char[] are mutable so we can clear the passwords after the usage.</li>
  <li>String literals goes to a pool that will not get garbage collected as other objects, hence might appear in memory dumps.</li>
  </ol>
  
  <p>But java.sql.DriverManager doesn't have a getConnection() that comply with the above best practice because its password parameter is String.</p>
  
  <blockquote>
    <p>DriverManager.getConnection(String url, String user, String password)</p>
  </blockquote>
  
  <p>I think the API should have an overloaded method with the following signature:</p>
  
  <blockquote>
    <p>DriverManager.getConnection(String url, String user, <strong>char[]</strong> password)</p>
  </blockquote>
  
  <p>What do you think about this? Do you see any alternative way to overcome this draw back?</p>
  
  <p>Would love to hear your thoughts.</p>