Added support for arrays in type conversion. #22

Merged
merged 1 commit into from May 21, 2013

Conversation

Projects
None yet
2 participants
@ffbit
Contributor

ffbit commented May 21, 2013

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

Related to the #21 issue.

Added support for arrays in type conversion.
Note: Arrays of primitives are not supported at the moment.
@lviggiano

This comment has been minimized.

Show comment
Hide comment
@lviggiano

lviggiano May 21, 2013

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

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

@lviggiano

This comment has been minimized.

Show comment
Hide comment
@lviggiano

lviggiano May 21, 2013

the above line misses a unit test

the above line misses a unit test

@lviggiano

This comment has been minimized.

Show comment
Hide comment
@lviggiano

lviggiano May 21, 2013

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)

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.

Show comment
Hide comment
@lviggiano

lviggiano May 21, 2013

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)

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.

Show comment
Hide comment
@lviggiano

lviggiano May 21, 2013

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

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

@lviggiano lviggiano merged commit 344b420 into lviggiano:master May 21, 2013

@ffbit

This comment has been minimized.

Show comment
Hide comment
@ffbit

ffbit May 21, 2013

Contributor

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

Contributor

ffbit commented May 21, 2013

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

@lviggiano

This comment has been minimized.

Show comment
Hide comment
@lviggiano

lviggiano May 21, 2013

Owner

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

Owner

lviggiano commented May 21, 2013

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

@ffbit

This comment has been minimized.

Show comment
Hide comment
@ffbit

ffbit May 21, 2013

Contributor

I've done.

I share you point about setting separator via annotation.

Contributor

ffbit commented May 21, 2013

I've done.

I share you point about setting separator via annotation.

@ffbit

This comment has been minimized.

Show comment
Hide comment
@ffbit

ffbit May 21, 2013

Contributor

Would you like me to implement any more features?

Contributor

ffbit commented May 21, 2013

Would you like me to implement any more features?

@lviggiano

This comment has been minimized.

Show comment
Hide comment
@lviggiano

lviggiano May 21, 2013

Owner

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.

Owner

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