Skip to content

Commit 7e2a79b

Browse files
committed
Refresh file table after reading updater files
We create the UpdaterFrame with an underlying FileTable around an empty FilesCollection, which is subsequently populated. However this population is not immediately propagated to the FileTable. This results in a stale TableRowSorter that does not initially know about all of the files. This is benign as the sorter isn't actually being used at the point of creation, and once it is used it's updated. It would normally throw an IOOBE except that apparently there was some work-around that prevented this. In JDK-8078514 this work-around apparently was removed, and in JDK-8160087 the behavior was changed to issue a warning, once, instead of IOOBE. When updating the Java version to JDK9 or newer we started seeing this warning. In this patch we update the FileTable after the FilesCollection is populated, which appears to avoid running into the warning.
1 parent d100588 commit 7e2a79b

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/main/java/net/imagej/ui/swing/updater/ImageJUpdater.java

+1
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,7 @@ public void run() {
137137
"Please download a recent version of this software.\n");
138138
}
139139
refreshUpdateSites(files);
140+
main.updateFilesTable();
140141
String warnings = files.reloadCollectionAndChecksum(progress);
141142
main.checkWritable();
142143
main.addCustomViewOptions();

0 commit comments

Comments
 (0)