Failed adapts return Exceptions as values when the result is coming from query cache.
Steps to reproduce:
- Adapt a Double value as a String
- Adaption Exception is thrown
- Do the same adapt again.
- Adapt returns the previous exception as a result. This usually leads to Class Cast Exception, since Java syntax expects a String.