On Fri, 27 Jan 2023 03:38:50 GMT, Prasanta Sadhukhan <[email protected]> 
wrote:

>> Phil Race has updated the pull request incrementally with one additional 
>> commit since the last revision:
>> 
>>   8300891
>
> src/java.desktop/share/classes/javax/swing/plaf/synth/SynthLookAndFeel.java 
> line 627:
> 
>> 625:      * using a resource co-located with the application or by
>> 626:      * providing a {@code SynthStyleFactory} are preferred.
>> 627:      * Consequently this method is deprecated and will be removed in a 
>> future release.
> 
> We probably can use "@see" tag to link the alternate preferred method 
> `load(InputStream input, Class<?> resourceBase)` since this is going to be 
> deprecated

Great suggestion. The javadoc should link to the alternatives `load` or 
`SynthStyleFactory`.

The following line should be added to javadoc:

     * @deprecated Use {@link #load(InputStream, Class)} or {@link 
SynthStyleFactory}
     *             as described above.

The entire paragraph could probably used in `@deprecated`. The result would 
look like this:
![Rendered javadoc with @deprecated before the added 
paragraph](https://user-images.githubusercontent.com/70774172/215103931-2f093a8a-f057-49f7-8dce-e8cbb9e2ff90.png)

Here's the code that I used:

     * information.
     *
     * @deprecated Whilst this API may be safe for loading local resources that 
are
     * ...
     * The alternative mechanisms to load styles from an
     * {@link #load(InputStream, Class) InputStream} using a resource
     * co-located with the application or by
     * providing a {@link SynthStyleFactory} are preferred.
     * ...

However, such use of linking for `load` with `InputStream` is likely to be 
confusing, so the text should be re-worded.

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

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

Reply via email to