Review/comment needed for the new public java.util.Base64 class (original) (raw)

Ulf Zibis Ulf.Zibis at CoSoCo.de
Mon Oct 29 18:15:32 UTC 2012


Hi Sherman,

can you give me a short answer please?

-Ulf

Am 23.10.2012 16:57, schrieb Ulf Zibis:

Am 23.10.2012 15:04, schrieb Alan Bateman:

I'm not sure that getUrlEncoder is the most suitable name to get a base64url encoder. The reason is that the method name makes it sound like it returns a URLEncoder or or at least an encoder for HTML forms. While more verbose, getBase64UrlEncoder is clear that it returns a base64url encoder. I'm wondering, why there are those get... methods at all. Alternatively you could make the appropriate constructors and predifined static variants public. So one only should use: Base64.Encoder encoder = new Base64.Encoder(...); Base64.Encoder urlEncoder = Base64.Encoder.RFC4648URLSAFE; No need for those looong method names. -Ulf



More information about the core-libs-dev mailing list