RFR: 8270903: sun.net.httpserver.HttpConnection: Improve toString
Julia Boes
jboes at openjdk.java.net
Thu Aug 5 09:25:30 UTC 2021
On Wed, 4 Aug 2021 15:11:59 GMT, Daniel Fuchs <dfuchs at openjdk.org> wrote:
>> Have a marginal preference for HttpConnection.class.getSimpleName(), since it is a constant, but don't object to getClass().
>
> Right - but then why not use a string literal? If you're going to call a method to get the class name then I assume you want to get the actual concrete class name... I don't have much objection either way - especially since I suspect there are no subclasses anyway...
Given that there are no subclasses and it's not a public class, I'll stick to the original version.
-------------
PR: https://git.openjdk.java.net/jdk/pull/4928
More information about the net-dev
mailing list