diff options
author | Manuel Bentele | 2021-11-11 09:04:49 +0100 |
---|---|---|
committer | Manuel Bentele | 2021-11-11 09:04:49 +0100 |
commit | fbb911b17546d9371da2e741a2262b6dbf121a20 (patch) | |
tree | 0259db37277e0817368beb94cafdcc9c7e608f11 /dozentenmodul | |
parent | Merge branch 'feature/docker-data-container' (diff) | |
download | tutor-module-fbb911b17546d9371da2e741a2262b6dbf121a20.tar.gz tutor-module-fbb911b17546d9371da2e741a2262b6dbf121a20.tar.xz tutor-module-fbb911b17546d9371da2e741a2262b6dbf121a20.zip |
[CLIENT] Fixes Java warnings
Diffstat (limited to 'dozentenmodul')
3 files changed, 3 insertions, 1 deletions
diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/VirtDropDownConfigEditorWindow.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/VirtDropDownConfigEditorWindow.java index cf055cbd..46bc032c 100644 --- a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/VirtDropDownConfigEditorWindow.java +++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/window/VirtDropDownConfigEditorWindow.java @@ -158,7 +158,7 @@ public class VirtDropDownConfigEditorWindow extends JDialog ActionListener hwListener = new ActionListener() { @Override public void actionPerformed(ActionEvent e) { - VirtOptionValue selected = (VirtOptionValue) ((JComboBox<VirtOptionValue>) e.getSource()).getSelectedItem(); + VirtOptionValue selected = VirtOptionValue.class.cast(JComboBox.class.cast(e.getSource()).getSelectedItem()); selected.apply(); btnSave.setEnabled(hasChanged()); } diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/layout/ContainerUploadPageLayout.java b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/layout/ContainerUploadPageLayout.java index 2bc4c768..171a059e 100644 --- a/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/layout/ContainerUploadPageLayout.java +++ b/dozentenmodul/src/main/java/org/openslx/dozmod/gui/wizard/layout/ContainerUploadPageLayout.java @@ -153,6 +153,7 @@ public class ContainerUploadPageLayout extends WizardPage { } static class ContainerTabPanel extends JPanel { + private static final long serialVersionUID = -2418240236311026868L; public final ContainerImageContext containerImageContext; ContainerTabPanel(ContainerImageContext imageContext) { diff --git a/dozentenmodul/src/main/java/org/openslx/dozmod/model/ContainerDefinition.java b/dozentenmodul/src/main/java/org/openslx/dozmod/model/ContainerDefinition.java index 9724ce61..0cf0f78e 100644 --- a/dozentenmodul/src/main/java/org/openslx/dozmod/model/ContainerDefinition.java +++ b/dozentenmodul/src/main/java/org/openslx/dozmod/model/ContainerDefinition.java @@ -62,6 +62,7 @@ public class ContainerDefinition extends Scanner scanner = new Scanner(file); while (scanner.hasNext()) { if(scanner.next().contains("FROM")){ + scanner.close(); return true; } } |