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

doesn't handle unicode propertynames #7

Open
casualjim opened this issue Aug 26, 2012 · 1 comment
Open

doesn't handle unicode propertynames #7

casualjim opened this issue Aug 26, 2012 · 1 comment

Comments

@casualjim
Copy link

When I reflect over a case class

case class UnicodePropetyCaseClass(`class-id`: Int, name: String)

then the bean descriptor only has the name property.
Could it be more appropriate to use scala.reflect.NameTransformer.decode so the class name can be unmangled?
Then it would pass this test: https://github.com/scalastuff/scalabeans/blob/master/src/main/scala/org/scalastuff/scalabeans/BeanIntrospector.scala#L105

but that will most likely break other things

@casualjim
Copy link
Author

I got that working by allowing all names that occur in constructor params.
I changed https://github.com/scalastuff/scalabeans/blob/master/src/main/scala/org/scalastuff/scalabeans/BeanIntrospector.scala#L105

to

if ctorParameterNames.contains(name) || !name.contains('$')

All the tests still pass after that change.

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

No branches or pull requests

1 participant