assertj / assertj/assertj-swing

CellWriter can block main thread when celleditor.stopEditing() is called

Ouverte
#83 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
import from fest-swing Improvement Major
Langage dominant
Java
Étoiles
121
Forks
52
Métriques de merge des PR
Aucune PR mergée en 30 j

Description

_Issue by **[Shawn Clowater](http://jira.codehaus.org/secure/ViewProfile.jspa?name=sclowater)** from Fri, 10 Dec 2010 18:34:19 -0600_
_Originally opened as http://jira.codehaus.org/browse/FEST-409_

---

We have a text editor that can pop a dialog from an inputVerifier() call. (it executes a lookup and will display an advanced search dialog if either no match or multiple matches were found)

In the case of setting a value and fest ultimately calling the stopEditing() which causes this dialog to display it causes a deadlock in the main execution thread so we can't do anything to process the dialog and our tests hang.

It's all fine until it gets down into the JTableStopCellEditingTask.doStopCellEditing(TableCellEditor cellEditor) method and then it will essentially wait forever. (until the test timeout kicks in)

I've managed to work around it by essentially cloning the BasicJTableCellWriter and then swapping out the textComponentWriter reference with an editor that issues a F2 keyevent in place of the stopEditing call.

It all works but to actually get at the pieces I needed to clone the BasicJTableCellWriter since the code I needed to override was either private or final. i.e. the handling of the cellWriterFor() method.

Looking back in the changelog history I see that F2 was wired up to start the editing at some point, it might be worthwhile to do the same thing for the stop Editing.

---

votes (original issue): 0
watches (original issue): 0

Guide de contribution

Ouvrir le guide de contribution

Piste de recherche

Commencez par JTableStopCellEditingTask.doStopCellEditing(TableCellEditor cellEditor) et examinez comment BasicJTableCellWriter appelle stopEditing lorsqu’un inputVerifier ouvre une boîte de dialogue. Reproduisez le scénario du test bloqué, puis vérifiez que l’édition de la cellule peut s’arrêter sans bloquer le thread principal et que la boîte de dialogue reste utilisable.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
java
Domaine
desktop, testing
Type d'issue
Bug
Difficulté
4/5
Temps estimé
3-5 jours
Activité
À l'abandon
Clarté
Plutôt claire
Accessibilité débutants
35/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.