From 6378f5e1660ee2970cf203267ef5bd4b5e348620 Mon Sep 17 00:00:00 2001 From: ramari16 Date: Fri, 25 Oct 2024 13:43:15 -0400 Subject: [PATCH] Remove superflous file load attempt (#125) --- .../hms/dbmi/avillach/hpds/processing/VariantService.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/processing/src/main/java/edu/harvard/hms/dbmi/avillach/hpds/processing/VariantService.java b/processing/src/main/java/edu/harvard/hms/dbmi/avillach/hpds/processing/VariantService.java index c8f94850..8979882a 100644 --- a/processing/src/main/java/edu/harvard/hms/dbmi/avillach/hpds/processing/VariantService.java +++ b/processing/src/main/java/edu/harvard/hms/dbmi/avillach/hpds/processing/VariantService.java @@ -176,13 +176,11 @@ private void loadGenomicCacheFiles() throws FileNotFoundException, IOException, ){ oos.writeObject(bucketIndex); oos.flush(); - oos.close(); } - }else { + }else if (new File(BUCKET_INDEX_BY_SAMPLE_FILE).exists()) { try (ObjectInputStream objectInputStream = new ObjectInputStream(new GZIPInputStream(new FileInputStream(BUCKET_INDEX_BY_SAMPLE_FILE)));){ log.info("loading " + BUCKET_INDEX_BY_SAMPLE_FILE); bucketIndex = (BucketIndexBySample) objectInputStream.readObject(); - objectInputStream.close(); } catch (IOException | ClassNotFoundException e) { log.error("an error occurred", e); }