From d713a3d73536392ac715371b607f5f44e3986660 Mon Sep 17 00:00:00 2001 From: Maschell Date: Wed, 10 Apr 2019 17:58:20 +0200 Subject: [PATCH] Throw an exception instead of returning null in the WUX DiscReader --- .../jnus/implementations/wud/reader/WUDDiscReaderSplitted.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/de/mas/wiiu/jnus/implementations/wud/reader/WUDDiscReaderSplitted.java b/src/de/mas/wiiu/jnus/implementations/wud/reader/WUDDiscReaderSplitted.java index 0d743b1..bafd7ed 100644 --- a/src/de/mas/wiiu/jnus/implementations/wud/reader/WUDDiscReaderSplitted.java +++ b/src/de/mas/wiiu/jnus/implementations/wud/reader/WUDDiscReaderSplitted.java @@ -17,6 +17,7 @@ package de.mas.wiiu.jnus.implementations.wud.reader; import java.io.File; +import java.io.FileNotFoundException; import java.io.IOException; import java.io.OutputStream; import java.io.RandomAccessFile; @@ -105,7 +106,7 @@ public class WUDDiscReaderSplitted extends WUDDiscReader { if (!part.exists()) { log.info("File does not exist"); - return null; + throw new FileNotFoundException(part.getAbsolutePath() + " does not exist"); } RandomAccessFile result = new RandomAccessFile(part, "r"); result.seek(getOffsetInFilePart(filePart, offset));