From: David ‘Bombe’ Roden Date: Fri, 16 Mar 2012 19:22:20 +0000 (+0100) Subject: Prevent NPE when URIGenerated message comes too late. X-Git-Tag: 0.10-rc1~46 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=afad3333c032676cbab9e5a074f5cc9f14c8aabc;p=jSite.git Prevent NPE when URIGenerated message comes too late. This fixes #259. --- diff --git a/src/de/todesbaum/jsite/application/ProjectInserter.java b/src/de/todesbaum/jsite/application/ProjectInserter.java index b14dadb..1859393 100644 --- a/src/de/todesbaum/jsite/application/ProjectInserter.java +++ b/src/de/todesbaum/jsite/application/ProjectInserter.java @@ -567,8 +567,8 @@ public class ProjectInserter implements FileScannerListener, Runnable { boolean finalized = Boolean.parseBoolean(message.get("FinalizedTotal")); fireProjectInsertProgress(succeeded, failed, fatal, total, finalized); } - success = "PutSuccessful".equals(messageName); - finished = success || "PutFailed".equals(messageName) || messageName.endsWith("Error"); + success |= "PutSuccessful".equals(messageName); + finished = (success && (finalURI != null)) || "PutFailed".equals(messageName) || messageName.endsWith("Error"); } }