SAML1 CheckRequestVersionHandler ClassCastException ?
Tom Zeller
tzeller at dragonacea.biz
Tue Jan 21 21:25:03 EST 2014
> It's typed AbstractMessageHandler<RequestAbstractType> so as soon as you
> call getMessage(), it will throw the exception.
Actually, getMessage() properly logs an IdPInitiatedSSORequest, but
getMessage().getClass() breaks, which was not what I was expecting.
> That's how generics work, it's all very odd. The cast happens at the
> instant you execute code that was written to assume the type was in fact
> what it was coded to be. Until then the type erasure causes it to just hum
> along silently even though it's all wrong internally. It's a time bomb
> waiting to go off.
Ah.
More information about the dev
mailing list