Integrated: 8146918: ConcurrentModificationException in MediaPlayer

2024-04-25 Thread n-gabe
On Thu, 22 Feb 2024 17:16:42 GMT, n-gabe  wrote:

> There is a ConcurrentModificationException in MediaPlayer when removing a 
> MediaView from it. The root cause is that you can't iterate over a HashSet 
> with for (WeakReference vref : viewRefs) and removing items from 
> the collection by viewRefs.remove(vref); within this loop.

This pull request has now been integrated.

Changeset: d8ca38a6
Author:n-gabe <11182122+n-g...@users.noreply.github.com>
Committer: Kevin Rushforth 
URL:   
https://git.openjdk.org/jfx/commit/d8ca38a6b7ed918318b956add150a5ae9c4c0981
Stats: 5 lines in 1 file changed: 1 ins; 0 del; 4 mod

8146918: ConcurrentModificationException in MediaPlayer

Reviewed-by: almatvee

-

PR: https://git.openjdk.org/jfx/pull/1377


Re: RFR: 8146918: ConcurrentModificationException in MediaPlayer [v3]

2024-04-24 Thread n-gabe
On Mon, 22 Apr 2024 15:05:07 GMT, n-gabe  wrote:

>> There is a ConcurrentModificationException in MediaPlayer when removing a 
>> MediaView from it. The root cause is that you can't iterate over a HashSet 
>> with for (WeakReference vref : viewRefs) and removing items from 
>> the collection by viewRefs.remove(vref); within this loop.
>
> n-gabe has updated the pull request incrementally with one additional commit 
> since the last revision:
> 
>   Remove needless copyright year

Thanks, please /integrate

-

PR Comment: https://git.openjdk.org/jfx/pull/1377#issuecomment-2076330503


Re: RFR: 8146918: ConcurrentModificationException in MediaPlayer [v2]

2024-04-22 Thread n-gabe
On Mon, 22 Apr 2024 13:52:39 GMT, Kevin Rushforth  wrote:

>> n-gabe has updated the pull request incrementally with one additional commit 
>> since the last revision:
>> 
>>   Update Copyright
>
> modules/javafx.media/src/main/java/javafx/scene/media/MediaPlayer.java line 2:
> 
>> 1: /*
>> 2:  * Copyright (c) 2010, 2022, 2024, Oracle and/or its affiliates. All 
>> rights reserved.
> 
> Copyright lines must have exactly one or two years. Please remove `, 2022`

Oh sorry, I wasn't aware of that. Now it is removed.

-

PR Review Comment: https://git.openjdk.org/jfx/pull/1377#discussion_r1574914527


Re: RFR: 8146918: ConcurrentModificationException in MediaPlayer [v3]

2024-04-22 Thread n-gabe
> There is a ConcurrentModificationException in MediaPlayer when removing a 
> MediaView from it. The root cause is that you can't iterate over a HashSet 
> with for (WeakReference vref : viewRefs) and removing items from 
> the collection by viewRefs.remove(vref); within this loop.

n-gabe has updated the pull request incrementally with one additional commit 
since the last revision:

  Remove needless copyright year

-

Changes:
  - all: https://git.openjdk.org/jfx/pull/1377/files
  - new: https://git.openjdk.org/jfx/pull/1377/files/bdc1af6e..89c56d29

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jfx&pr=1377&range=02
 - incr: https://webrevs.openjdk.org/?repo=jfx&pr=1377&range=01-02

  Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod
  Patch: https://git.openjdk.org/jfx/pull/1377.diff
  Fetch: git fetch https://git.openjdk.org/jfx.git pull/1377/head:pull/1377

PR: https://git.openjdk.org/jfx/pull/1377


Re: RFR: 8146918: ConcurrentModificationException in MediaPlayer

2024-04-21 Thread n-gabe
On Thu, 22 Feb 2024 17:16:42 GMT, n-gabe  wrote:

> There is a ConcurrentModificationException in MediaPlayer when removing a 
> MediaView from it. The root cause is that you can't iterate over a HashSet 
> with for (WeakReference vref : viewRefs) and removing items from 
> the collection by viewRefs.remove(vref); within this loop.

Sure, done.

-

PR Comment: https://git.openjdk.org/jfx/pull/1377#issuecomment-2068067764


Re: RFR: 8146918: ConcurrentModificationException in MediaPlayer [v2]

2024-04-21 Thread n-gabe
> There is a ConcurrentModificationException in MediaPlayer when removing a 
> MediaView from it. The root cause is that you can't iterate over a HashSet 
> with for (WeakReference vref : viewRefs) and removing items from 
> the collection by viewRefs.remove(vref); within this loop.

n-gabe has updated the pull request incrementally with one additional commit 
since the last revision:

  Update Copyright

-

Changes:
  - all: https://git.openjdk.org/jfx/pull/1377/files
  - new: https://git.openjdk.org/jfx/pull/1377/files/857218e8..bdc1af6e

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jfx&pr=1377&range=01
 - incr: https://webrevs.openjdk.org/?repo=jfx&pr=1377&range=00-01

  Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod
  Patch: https://git.openjdk.org/jfx/pull/1377.diff
  Fetch: git fetch https://git.openjdk.org/jfx.git pull/1377/head:pull/1377

PR: https://git.openjdk.org/jfx/pull/1377


Re: RFR: 8146918: ConcurrentModificationException in MediaPlayer

2024-04-19 Thread n-gabe
On Thu, 22 Feb 2024 17:16:42 GMT, n-gabe  wrote:

> There is a ConcurrentModificationException in MediaPlayer when removing a 
> MediaView from it. The root cause is that you can't iterate over a HashSet 
> with for (WeakReference vref : viewRefs) and removing items from 
> the collection by viewRefs.remove(vref); within this loop.

You may use this simple showcase: 
https://github.com/n-gabe/jfx-two-media-view-sample

-

PR Comment: https://git.openjdk.org/jfx/pull/1377#issuecomment-2066097662


RFR: 8146918: ConcurrentModificationException in MediaPlayer

2024-04-18 Thread n-gabe
There is a ConcurrentModificationException in MediaPlayer when removing a 
MediaView from it. The root cause is that you can't iterate over a HashSet with 
for (WeakReference vref : viewRefs) and removing items from the 
collection by viewRefs.remove(vref); within this loop.

-

Commit messages:
 - fix indentation
 - fix ConcurrentModificationException in MediaPlayer.java

Changes: https://git.openjdk.org/jfx/pull/1377/files
  Webrev: https://webrevs.openjdk.org/?repo=jfx&pr=1377&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8146918
  Stats: 4 lines in 1 file changed: 1 ins; 0 del; 3 mod
  Patch: https://git.openjdk.org/jfx/pull/1377.diff
  Fetch: git fetch https://git.openjdk.org/jfx.git pull/1377/head:pull/1377

PR: https://git.openjdk.org/jfx/pull/1377