File tree Expand file tree Collapse file tree 1 file changed +2
-9
lines changed
src/java.desktop/share/classes/javax/sound/midi Expand file tree Collapse file tree 1 file changed +2
-9
lines changed Original file line number Diff line number Diff line change 1
1
/*
2
- * Copyright (c) 1999, 2017 , Oracle and/or its affiliates. All rights reserved.
2
+ * Copyright (c) 1999, 2025 , Oracle and/or its affiliates. All rights reserved.
3
3
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4
4
*
5
5
* This code is free software; you can redistribute it and/or modify it
@@ -198,15 +198,8 @@ public boolean remove(MidiEvent event) {
198
198
// Or: document that the ticks() length will not be reduced
199
199
// by deleting events (unless the EOT event is removed)
200
200
synchronized (eventsList ) {
201
- if (set .remove (event )) {
202
- int i = eventsList .indexOf (event );
203
- if (i >= 0 ) {
204
- eventsList .remove (i );
205
- return true ;
206
- }
207
- }
201
+ return set .remove (event ) && eventsList .remove (event );
208
202
}
209
- return false ;
210
203
}
211
204
212
205
/**
You can’t perform that action at this time.
0 commit comments