RFR: 8282999: Add support for EXT-X-MEDIA tag in HTTP Live Streaming [v3]

Alexander Matveev almatvee at openjdk.org
Wed May 8 22:02:21 UTC 2024


On Wed, 8 May 2024 12:39:24 GMT, Kevin Rushforth <kcr at openjdk.org> wrote:

>> When these classes were nested classes I got issues with second instance of HLSConnectionHolder. If I remember correctly nested classes of second instance of HLSConnectionHolder were using fields of first HLSConnectionHolder instance. Maybe because I initiated second instance incorrectly. To avoid any such potential issues I decided to move away from nested classes. I would prefer to keep as is or better to move all nested classes under separate package (com.sun.media.jfxmedia.locator.hls).
>
> Did you declare them as `static` (nested) classes? If not, then yes, they will have the behavior you mentioned. A non-static "inner" class exists within an instance of the outer class. A static "nested" class does not. Other than scoping, a nested class behaves like a top-level class.
> 
> If you do want to keep them as separate top-level classes, then please move each to its own file. I would not recommend creating a new package, though, since that will involve more changes to make the classes and elements you need public.

No, I did not declared them as `static`. Fixed by declaring these classes as nested static classes.

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

PR Review Comment: https://git.openjdk.org/jfx/pull/1435#discussion_r1594747723


More information about the openjfx-dev mailing list