spring-projects / spring-projects/spring-data-redis

Refine `JedisConnectionFactory`

Open
#2,745 0 comments 0 reactions 1 assignee View on GitHub

@jxblum is already working on this.

Since Oct 26, 2023.

in: jedis type: task
Dominant language
Java
Stars
1.9k
Forks
1.3k
PR merge metrics
No merged PRs in 30d

Description

General code refactoring and cleanup task triggered while considering the fallout and possible workaround for #2738.

Introduces private (static) methods (and/or local variables) to simplify and remove duplicate logic while simultaneously removing broken line breaks affecting readability and understanding.

NOTE: line breaks are also being affected by our excessive indentation.

Simplifies assertions by making consistent use of Spring Frameworks Assert facility rather than unnecessary conditional blocks.

Refers to state variables using getter (rather than direct variable reference) where applicable helping to improve extensibility.

Reorganizes state variables in both JedisConnectionFactory as well as MutableJedisClientConfiguration by type in alphabetical order.

Organizes code according to Spring Data source code guidelines (e.g. private methods towards the end of classes).

Deprecates createTopologyProvider(..) in favor of createClusterTopologyProvider(..) for consistent and clarified naming.

Adds additional and judicious white space to improve readability.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.