Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ArrayIndexOutOfBoundsException in JavaGUI #68

Closed
dergo opened this issue Oct 8, 2013 · 1 comment
Closed

ArrayIndexOutOfBoundsException in JavaGUI #68

dergo opened this issue Oct 8, 2013 · 1 comment
Milestone

Comments

@dergo
Copy link
Collaborator

dergo commented Oct 8, 2013

When using JavaGUI, it's possible to get the following exception:

java.lang.ArrayIndexOutOfBoundsException: 67
at com.qspin.qtaste.javagui.server.UpdateComponentCommander.getComponentByName(UpdateComponentCommander.java:70)
at com.qspin.qtaste.javagui.server.UpdateComponentCommander.executeCommand(UpdateComponentCommander.java:26)
at com.qspin.qtaste.javagui.server.JavaGUI.clickOnButton(JavaGUI.java:78)
at com.qspin.qtaste.javagui.server.JavaGUI.clickOnButton(JavaGUI.java:73)

Looking at the UpdateComponentCommander code I find this:
66: for (int w = 0; w < Frame.getWindows().length; w++) {
67: Window window = Frame.getWindows()[w];
which is absolutely not safe, since each getWindows() call could return a different array because windows can be closed or opened concurrently.

@lvboque
Copy link
Collaborator

lvboque commented Nov 20, 2013

Fixed in 2.2.0

@lvboque lvboque closed this as completed Nov 20, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants