On Fri, 11 Apr 2025 14:48:35 GMT, Michael Strauß <[email protected]> wrote:
>> Normally, yes, but in some cases the context is important. Yes, one can
>> look at the git history and get the JBS from there (unless the code was
>> moved or merged), but it seems to be an easier way to provide the answer on
>> the "why was this change made" than write the _War and Peace_ in the
>> comments. In this case it's perfect - we have good comments and the JBS for
>> anyone who wants to know more.
>
> A good example of what should _not_ be done is something along the lines of
> ComboBoxListViewSkin:158:
>
> // Fix for JDK-8115587. Additional code related to this bug is
> further below.
> this.listView.setManaged(false);
> getChildren().add(listView);
> // -- end of fix
Exactly! At the same time, `Declaration:160` might be an example of a suitable
JBS reference.
// JDK-8126015
//
// We know when the .css file is parsed what the stylesheet URL is,
// but that might not be the URL of the deployed file. So for URL
// types, the parser inserts a null placeholder for the URL and we
// fix it up here. This method is called from Rule#setStylesheet
// and from Rule#declarations onChanged method.
//
void fixUrl(String stylesheetUrl) {
-------------
PR Review Comment: https://git.openjdk.org/jfx/pull/1770#discussion_r2039711344