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

ClassCastException in org/openid4java/message/ax/FetchResponse #199

Open
GoogleCodeExporter opened this issue Jun 4, 2015 · 0 comments · May be fixed by #214
Open

ClassCastException in org/openid4java/message/ax/FetchResponse #199

GoogleCodeExporter opened this issue Jun 4, 2015 · 0 comments · May be fixed by #214

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. Request AX attribute with count == 0
2. Get a ClassCastException

What is the expected output? What do you see instead?

It should return all values. Instead it crashes.


What version of the product are you using? On what operating system?

0.9.7

Please provide any additional information below.

From org.openid4java.message.ax.FetchResponse.createFetchResponse(FetchRequest, 
Map):

                Iterator values = ((List)value).iterator();

                // only send up the the maximum requested number
                int max = req.getCount(alias);
                if (max == 0)
                    max = ((List)values).size(); // <-- this is the class cast exception

Last line should read:

max = ((List)value).size();

(value is a List, values is an Iterator).

Original issue reported on code.google.com by [email protected] on 15 Oct 2013 at 7:15

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant