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

Checking if bean is a proxy #291

Merged
merged 5 commits into from
Jan 1, 2014
Merged

Checking if bean is a proxy #291

merged 5 commits into from
Jan 1, 2014

Conversation

garcia-jj
Copy link
Member

I don't know if this is the best solution.

When we use redirects like result.redirectTo(this).coolMethod(), CDI is asked for a instance for a proxy, that throws an exception.

Because this is a draft, after your suggestions, I'll write some docs.

}

public static <T> Class<?> extractRawType(Class<T> type) {
return isCDIProxy(type) ? type.getSuperclass() : type;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldn't we be checking for javassist/cglib proxies as well?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since JavassistProxifier is managed class, and this class gets all managed classes, we will get a overflow.

@Turini
Copy link
Member

Turini commented Dec 31, 2013

garcia-jj added a commit that referenced this pull request Jan 1, 2014
@garcia-jj garcia-jj merged commit 41ade0d into master Jan 1, 2014
@garcia-jj garcia-jj deleted the ot-check-if-bean-is-proxy branch January 1, 2014 00:55
@Turini Turini added this to the 4.0.0-beta-4 milestone Mar 6, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants