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 handling for string lists in ClusterBuilder #395

Merged
merged 1 commit into from
Jun 11, 2016

Conversation

ksilin
Copy link
Contributor

@ksilin ksilin commented Jun 11, 2016

Fixes #388

Problem

configuration contactPoints = ["127.0.0.1", "127.0.0.2"] should create a valid datastax.driver.core.Cluster#Builder by using the addContactPoints method.

Solution

added another else if block in ClusterBuilder#param

Notes

addContactPoints(String...) is the only relevant varargs signature in Builder, so I only took care of adding and testing string lists

Checklist

  • Unit test all changes
  • Update README.md if applicable
  • Add [WIP] to the pull request title if it's work in progress
  • Squash commits that aren't meaningful changes
  • Run sbt scalariformFormat test:scalariformFormat to make sure that the source files are formatted

@getquill/maintainers

private def param(key: String, tpe: Class[_], cfg: Config) =
Try {
if (tpe == classOf[String])
cfg.getString(key)
else if (tpe == stringArrayClass)
cfg.getStringList(key).asScala.toArray
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

simply calling toArray without explicit asScala did not work for some reason

@fwbrasil
Copy link
Collaborator

@ksilin thanks! :)

@fwbrasil fwbrasil merged commit 9445a75 into zio:master Jun 11, 2016
jilen pushed a commit that referenced this pull request Jun 11, 2024
Bumps [actions/setup-java](https://github.com/actions/setup-java) from 3.13.0 to 4.0.0.
- [Release notes](https://github.com/actions/setup-java/releases)
- [Commits](actions/setup-java@v3.13.0...v4.0.0)

---
updated-dependencies:
- dependency-name: actions/setup-java
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
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

Successfully merging this pull request may close these issues.

2 participants