On Wed, 10 Jul 2024 15:00:31 GMT, Kevin Rushforth <k...@openjdk.org> wrote:

>> modules/javafx.controls/src/test/java/test/javafx/scene/control/TooltipTest.java
>>  line 709:
>> 
>>> 707:     }
>>> 708: 
>>> 709:     private String toBase64(String css) {
>> 
>> suggestion:
>> 
>> private static String encode(String css) {
>>   return "data:base64," + 
>> Base64.getUrlEncoder().encodeToString(css.getBytes(StandardCharsets.UTF_8));
>> }
>
> I agree that it could be static, although I prefer the name `toBase64`.

my comment was to avoid replicating "data:base64,", and with that, it is not 
base64 anymore, but base-64-encoded url.

the best place for this method is probably in some utility class so it can be 
reused.

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

PR Review Comment: https://git.openjdk.org/jfx/pull/1394#discussion_r1672468522

Reply via email to