Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't cast cached Throwable to Exception as it's too narrow. (PAYARA-1126) #1139

Merged

Conversation

jerrinot
Copy link
Contributor

Reasoning:
JCache spec and Payara implementation allows caching of exceptions.
In theory everything extending Throwable can be cached -> casting to
Exception is not safe as it can throw ClassCastException

Reasoning:
JCache spec and Payara implementation allows caching of exceptions.
In theory everything extending Throwable can be cached -> casting to
Exception is  not safe as it can throw ClassCastException
@payara-ci
Copy link
Contributor

Can one of the admins verify this patch?

1 similar comment
@payara-ci
Copy link
Contributor

Can one of the admins verify this patch?

@smillidge
Copy link
Contributor

jenkins test please

@smillidge smillidge changed the title Don't cast cached Throwable to Exception as it's too narrow. Don't cast cached Throwable to Exception as it's too narrow. (PAYARA-1126) Oct 23, 2016
@payara-ci
Copy link
Contributor

All tests have passed

@smillidge smillidge merged commit ab3292b into payara:master Oct 23, 2016
@jerrinot jerrinot deleted the classcast-exception-when-caching-throwable branch October 24, 2016 06:25
@OndroMih OndroMih added this to the Payara 4.1.1.164 milestone Nov 21, 2016
lprimak pushed a commit to flowlogix/Payara that referenced this pull request Jul 5, 2017
…1139)

Reasoning:
JCache spec and Payara implementation allows caching of exceptions.
In theory everything extending Throwable can be cached -> casting to
Exception is  not safe as it can throw ClassCastException
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants