assertj / assertj/assertj-swing

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

オープン
#83 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
import from fest-swing Improvement Major
主要言語
Java
スター
121
フォーク
52
PR マージ指標
30日以内にマージされた PR はありません

説明

_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

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

JTableStopCellEditingTask.doStopCellEditing(TableCellEditor cellEditor) から始め、inputVerifier がダイアログを開くときに BasicJTableCellWriter がどのように stopEditing を呼び出すかを調べてください。ハングするテストのシナリオを再現し、その後、メインスレッドをブロックせずにセル編集を停止でき、ダイアログが引き続き使用可能であることを確認してください。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
java
領域
desktop, testing
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
35/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。