From 2d9f26d758c7761be816924ca8b3421dd9e8fb45 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Wed, 14 Apr 2021 11:43:48 +0200 Subject: [vm/DiskImage] Remove File constructor, make sure open file doesn't leak --- src/main/java/org/openslx/vm/disk/DiskImageQcow2.java | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) (limited to 'src/main/java/org/openslx/vm/disk/DiskImageQcow2.java') diff --git a/src/main/java/org/openslx/vm/disk/DiskImageQcow2.java b/src/main/java/org/openslx/vm/disk/DiskImageQcow2.java index 5f72a00..a9826e4 100644 --- a/src/main/java/org/openslx/vm/disk/DiskImageQcow2.java +++ b/src/main/java/org/openslx/vm/disk/DiskImageQcow2.java @@ -1,8 +1,5 @@ package org.openslx.vm.disk; -import java.io.File; -import java.io.FileNotFoundException; -import java.io.IOException; import java.io.RandomAccessFile; /** @@ -46,25 +43,12 @@ public class DiskImageQcow2 extends DiskImage */ private static final int QCOW2_MAGIC = 0x514649fb; - /** - * Creates a new QCOW2 disk image from an existing QCOW2 image file. - * - * @param diskImage file to a QCOW2 disk storing the image content. - * - * @throws FileNotFoundException cannot find specified QCOW2 disk image file. - * @throws IOException cannot access the content of the QCOW2 disk image file. - */ - public DiskImageQcow2( File disk ) throws FileNotFoundException, IOException - { - super( disk ); - } - /** * Creates a new QCOW2 disk image from an existing QCOW2 image file. * * @param diskImage file to a QCOW2 disk storing the image content. */ - public DiskImageQcow2( RandomAccessFile disk ) + DiskImageQcow2( RandomAccessFile disk ) { super( disk ); } -- cgit v1.2.3-55-g7522