Skip to content

Consider to trim each item in comma-separated configurations #11029

Closed

Description

@bitholic

Recently, I have used spring-boot-starter-data-redis and configured its sentinel nodes like "xx.xx.xx.xx:xxxx, xx.xx.xx.xx:xxxx", unfortunately, the application started failed because of the space after the comma. Although the docs point out it is "comma-separated", using space after a comma is more customary, So I think it would be better to trim() those items in comma-separated configurations.

Activity

  1. added
    status: waiting-for-triage
    on Nov 15, 2017
  2. changed the title [-]consider to trim each item in comma-separated configurations[/-] [+]Consider to trim each item in comma-separated configurations[/+] on Nov 16, 2017
  3. added
    type: bug
    and removed
    status: waiting-for-triage
    on Nov 16, 2017
  4. added this to the 2.0.0.M7 milestone on Nov 16, 2017
  5. philwebb commented on Nov 16, 2017

    @philwebb
    Member

    The binder in 2.0 will automatically trim strings so switching to a String[] should be enough to fix this going forward.

  6. snicoll commented on Nov 16, 2017

    @snicoll
    Member

    @philwebb Is there a reason why you've used an array for this? I think most properties would use a List.

  7. philwebb commented on Nov 17, 2017

    @philwebb
    Member

    No specific reason, I just picked it at random. Will re-open to change it to a List.

  8. snicoll commented on Nov 17, 2017

    @snicoll
    Member

    @philwebb I pushed 5728d96. If you change the description of a key, you have to update the appendix. I did look at #10870 and didn't see a change for the "Comma-separated` bits so I've restored it. If you feel differently we should probably write those rules down on the wiki (I don't mind either way).

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

Metadata

Metadata

Labels

type: bug

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions