Fix possible NPE in PatchDetailServiceImpl

When a NoSuchChangeException is thrown 'result' may not be set.

Change-Id: I873fcdcc12fec775fdc36dd73e5a9336c40aad72
Signed-off-by: Edwin Kempin <edwin.kempin@sap.com>
This commit is contained in:
Edwin Kempin
2013-08-22 15:09:23 +02:00
committed by Edwin Kempin
parent 1d947bf77c
commit 7a940a787c

View File

@@ -139,7 +139,7 @@ class PatchDetailServiceImpl extends BaseServiceImplementation implements
}
return changeDetailFactory.create(result.getChangeId()).call();
} catch (NoSuchChangeException e) {
throw new Failure(new NoSuchChangeException(result.getChangeId()));
throw new Failure(new NoSuchChangeException(psid.getParentKey()));
} catch (NoSuchProjectException e) {
throw new Failure(e);
} catch (NoSuchEntityException e) {