Make CcmObject resolver fault tolerant
parent
c17d2b40db
commit
4d4cda372c
|
|
@ -57,14 +57,15 @@ public class CcmObjectIdResolver implements Serializable, ObjectIdResolver {
|
|||
.createCdiUtil()
|
||||
.findBean(CcmObjectRepository.class)
|
||||
.findFirstObjectByUuid(id.key.toString())
|
||||
.orElseThrow(
|
||||
() -> new IllegalArgumentException(
|
||||
String.format(
|
||||
"No CcmObject with UUID %s in the database.",
|
||||
id.key.toString()
|
||||
)
|
||||
)
|
||||
);
|
||||
.orElse(null);
|
||||
// .orElseThrow(
|
||||
// () -> new IllegalArgumentException(
|
||||
// String.format(
|
||||
// "No CcmObject with UUID %s in the database.",
|
||||
// id.key.toString()
|
||||
// )
|
||||
// )
|
||||
// );
|
||||
} catch (NonUniqueResultException ex) {
|
||||
throw new UnexpectedErrorException(
|
||||
String.format(
|
||||
|
|
|
|||
Loading…
Reference in New Issue