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

Added support for arrays in type conversion. #22

Merged
merged 1 commit into from May 21, 2013

Conversation

@ffbit
Copy link
Contributor

@ffbit ffbit commented May 21, 2013

Note: Arrays of primitives are not supported at the moment.

Related to the #21 issue.

Note: Arrays of primitives are not supported at the moment.
@lviggiano

This comment has been minimized.

I think you should not catch anything here; just let the exception pass

@lviggiano

This comment has been minimized.

the above line misses a unit test

@lviggiano

This comment has been minimized.

The separator "," is fine as default, but we must think to allow the user to specify a different separator using a new annotation. (will implement later)

@lviggiano

This comment has been minimized.

The method String.split(regex) can be called as String.split(regex, limit) with limit=-1 to allow empty strings. example

stringprop=foo,bar,baz,,

it will return 5 elements ("foo", "bar", "baz", "", ""); it may be opinable, but I think it is more correct than returning just the 3 non empty elements ("foo", "bar","baz")

See: http://docs.oracle.com/javase/6/docs/api/java/lang/String.html#split(java.lang.String,%20int)

@lviggiano

This comment has been minimized.

Copy link

@lviggiano lviggiano commented on 344b420 May 21, 2013

Looks pretty good to me, I will merge it asap.

@lviggiano lviggiano merged commit 344b420 into lviggiano:master May 21, 2013
@ffbit
Copy link
Contributor Author

@ffbit ffbit commented May 21, 2013

Thanks, Luigi!
I'll add changes according to your review asap.

@lviggiano
Copy link
Owner

@lviggiano lviggiano commented May 21, 2013

you can just pull from my master, I already implemented.

@ffbit
Copy link
Contributor Author

@ffbit ffbit commented May 21, 2013

I've done.

I share you point about setting separator via annotation.

@ffbit
Copy link
Contributor Author

@ffbit ffbit commented May 21, 2013

Would you like me to implement any more features?

@lviggiano
Copy link
Owner

@lviggiano lviggiano commented May 21, 2013

Everybody is welcome to contribute, that's the spirit of github, isn't it?

I am very picky with code as you see :). I shall take back implementation on this library, since it's long time now I'm not looking into it. I got some personal/health problems I am addressing right now, but I count to start coding again soon.

@ffbit ffbit deleted the ffbit:arrays-support branch May 21, 2013
@ffbit ffbit restored the ffbit:arrays-support branch May 21, 2013
@ffbit ffbit deleted the ffbit:arrays-support branch May 21, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.