提交 09dacb64 编写于 作者: M malenkov

8019975: closed/javax/swing/JFileChooser/4966171/bug4966171.java throws...

8019975: closed/javax/swing/JFileChooser/4966171/bug4966171.java throws java.io.NotSerializableException: javax.swing.plaf.basic.BasicFileChooserUI$AcceptAllFileFilter
Reviewed-by: alexsch
上级 172077e0
......@@ -1149,9 +1149,10 @@ public class JFileChooser extends JComponent implements Accessible {
int index = filters.indexOf(f);
if (index >= 0) {
if(getFileFilter() == f) {
if (isAcceptAllFileFilterUsed()) {
FileFilter aaff = getAcceptAllFileFilter();
if (isAcceptAllFileFilterUsed() && (aaff != f)) {
// choose default filter if it is used
setFileFilter(getAcceptAllFileFilter());
setFileFilter(aaff);
}
else if (index > 0) {
// choose the first filter, because it is not removed
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册