Fix the warning when you try to decrypt a FSTEntry where the content is empty.

This commit is contained in:
Maschell 2019-04-19 11:37:22 +02:00
parent dbad684549
commit 39d10291a2

View File

@ -107,9 +107,8 @@ public class FSTDataProviderNUSTitle implements FSTDataProvider, HasNUSTitle {
log.info("Decryption not possible because no ticket was set."); log.info("Decryption not possible because no ticket was set.");
} else if (entry.isNotInPackage()) { } else if (entry.isNotInPackage()) {
log.info("Decryption not possible because the FSTEntry is not in this package"); log.info("Decryption not possible because the FSTEntry is not in this package");
} else if (entry.getContent() == null) { } else if (!entry.getContent().isPresent()) {
// TODO: convert it to an Optional log.info("Decryption not possible because the Content was empty");
log.info("Decryption not possible because the Content was null");
} }
outputStream.close(); outputStream.close();
return false; return false;