andi-huber commented on PR #2259: URL: https://github.com/apache/causeway/pull/2259#issuecomment-1986745644
Hi @danhaywood, building on your investigations a one-liner fix would be to just add a filter like ```java protected ManagedObject getObjectAdapterElseThrowNotFound( final String domainType, final String instanceIdEncoded, final @NonNull UnaryOperator<RestfulObjectsApplicationException> onRoException) { final String instanceIdDecoded = UrlDecoderUtils.urlDecode(instanceIdEncoded); val bookmark = Bookmark.forLogicalTypeNameAndIdentifier(domainType, instanceIdDecoded); return metaModelContext.getObjectManager().loadObject(bookmark) //CAUSEWAY-3620 don't let EMPTY ManagedObject(s) pass .filter(_Predicates.not(ManagedObjects::isNullOrUnspecifiedOrEmpty)) .orElseThrow(()->onRoException.apply( RestfulObjectsApplicationException .createWithMessage(HttpStatusCode.NOT_FOUND, "Could not determine adapter for bookmark: '%s'", bookmark))); } ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@causeway.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org