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

Fix value rendering in error last cause for primitive types #2992

Merged
merged 1 commit into from
May 30, 2015

Conversation

davidmoten
Copy link
Collaborator

When an error occurs some Operators (like map) include the value in the exception cause to help debugging. The intent is that for the 9 primitive types (int/Integer, double/Double, byte/Byte, char/Character etc) we render the value using value.toString but the test for being a primitive does not work because .isPrimitive always returns false (primitives have always been autoboxed by the time they get here).

The fix is to create a lazy loaded singleton set of the primitive classes (Integer.class, Double.class, etc) and check for membership in that set.

Unit tests included for each primitive type.

@akarnokd akarnokd added the Bug label May 30, 2015
@akarnokd
Copy link
Member

Good catch!

akarnokd added a commit that referenced this pull request May 30, 2015
Fix value rendering in error last cause for primitive types
@akarnokd akarnokd merged commit 84084da into ReactiveX:1.x May 30, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants