Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Genesys PGR
Uploader
Commits
18d749b2
Commit
18d749b2
authored
Sep 16, 2019
by
Matija Obreza
Browse files
Fix: Removing futures by index
parent
2fd3cd82
Changes
1
Hide whitespace changes
Inline
Side-by-side
anno-gui/src/main/java/org/genesys2/anno/gui/PushDialog.java
View file @
18d749b2
...
...
@@ -307,11 +307,8 @@ public class PushDialog extends Dialog {
for
(
int
i
=
futures
.
size
()
-
1
;
i
>=
0
;
i
--)
{
Future
<?>
future
=
futures
.
get
(
i
);
if
(
future
==
null
)
{
continue
;
}
if
(
future
.
isDone
()
||
future
.
isCancelled
())
{
futures
.
remove
(
future
);
if
(
future
==
null
||
future
.
isDone
()
||
future
.
isCancelled
())
{
futures
.
remove
(
i
);
}
else
{
future
.
cancel
(
true
);
}
...
...
@@ -526,11 +523,8 @@ public class PushDialog extends Dialog {
do
{
for
(
int
i
=
futures
.
size
()
-
1
;
i
>=
0
;
i
--)
{
Future
<?>
future
=
futures
.
get
(
i
);
if
(
future
==
null
)
{
continue
;
}
if
(
future
.
isDone
())
{
futures
.
remove
(
future
);
if
(
future
==
null
||
future
.
isDone
())
{
futures
.
remove
(
i
);
}
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment