summaryrefslogtreecommitdiffstats
path: root/dozentenmodul/src/main
diff options
context:
space:
mode:
authorJonathan Bauer2018-04-27 17:54:05 +0200
committerJonathan Bauer2018-04-27 17:54:05 +0200
commit29250a799d8a6a590c99534a22717b1b415e6849 (patch)
tree01615770ccb75910563a8e204eb1ee9888fbbf10 /dozentenmodul/src/main
parent[server] Print feature string on startup (diff)
downloadtutor-module-29250a799d8a6a590c99534a22717b1b415e6849.tar.gz
tutor-module-29250a799d8a6a590c99534a22717b1b415e6849.tar.xz
tutor-module-29250a799d8a6a590c99534a22717b1b415e6849.zip
[client] fix bad public image list pruning....
Diffstat (limited to 'dozentenmodul/src/main')
-rw-r--r--dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/ImagePublishedWindow.java10
1 files changed, 6 insertions, 4 deletions
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/ImagePublishedWindow.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/ImagePublishedWindow.java
index 3fc119ec..5c1e498d 100644
--- a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/ImagePublishedWindow.java
+++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/ImagePublishedWindow.java
@@ -9,6 +9,7 @@ import java.awt.event.MouseEvent;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
import java.util.ArrayList;
+import java.util.Iterator;
import java.util.List;
import java.util.regex.Pattern;
import java.util.regex.PatternSyntaxException;
@@ -257,10 +258,11 @@ public class ImagePublishedWindow extends ImagePublishedWindowLayout implements
// in case they somehow manage to get published. Remove this when we
// support publishing images from other hypervisors.
if (Session.hasFeature(Feature.MULTIPLE_HYPERVISORS)) {
- for (int i = 0; i < imagePublishedList.size(); i++) {
- ImageSummaryRead current = imagePublishedList.get(i);
- if (current.virtId != TConst.VIRT_VMWARE) {
- imagePublishedList.remove(i);
+ for (Iterator<ImageSummaryRead> iter = imagePublishedList.listIterator(); iter
+ .hasNext();) {
+ ImageSummaryRead current = iter.next();
+ if (current != null && current.virtId != TConst.VIRT_VMWARE) {
+ iter.remove();
}
}
}