Please review this JEP486 cleanup PR in the 
`s.n.w.p.mailto.MailToURLConnection` and `sun.net.smtp.SmtpClient` classes.

* The `MailToURLConnection::getPermission` override with the related 
`permission` field is removed
* The SM property access check in `MailToURLConnection::getFromAddress` is 
removed
* The `SmtpClient` use of `GetPropertyAction` is replaced with plain 
`System::getProperty`

As a side note I have been programming Java since 1998 and I was not aware that 
this very limited (untested?) mechanism for sending email existed in the JDK. 
Unless it is in extensive use, perhaps we should consider deprecating it 
somehow. Superior alternatives exist.

-------------

Commit messages:
 - Remove SecurityManager permission checking from SMTPClient
 - Remove SecurityManager permission checking from MailToURLConnection

Changes: https://git.openjdk.org/jdk/pull/22138/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=22138&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8344189
  Stats: 24 lines in 2 files changed: 0 ins; 20 del; 4 mod
  Patch: https://git.openjdk.org/jdk/pull/22138.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/22138/head:pull/22138

PR: https://git.openjdk.org/jdk/pull/22138

Reply via email to