diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/data/redis/PropertiesRedisConnectionDetails.java b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/data/redis/PropertiesRedisConnectionDetails.java
index 458baa938191..afef1f0d2dab 100644
--- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/data/redis/PropertiesRedisConnectionDetails.java
+++ b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/data/redis/PropertiesRedisConnectionDetails.java
@@ -1,5 +1,5 @@
 /*
- * Copyright 2012-2024 the original author or authors.
+ * Copyright 2012-2025 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -39,7 +39,7 @@ class PropertiesRedisConnectionDetails implements RedisConnectionDetails {
 	@Override
 	public String getUsername() {
 		if (this.properties.getUrl() != null) {
-			ConnectionInfo connectionInfo = connectionInfo(this.properties.getUrl());
+			ConnectionInfo connectionInfo = RedisConnectionConfiguration.parseUrl(this.properties.getUrl());
 			return connectionInfo.getUsername();
 		}
 		return this.properties.getUsername();
@@ -48,7 +48,7 @@ public String getUsername() {
 	@Override
 	public String getPassword() {
 		if (this.properties.getUrl() != null) {
-			ConnectionInfo connectionInfo = connectionInfo(this.properties.getUrl());
+			ConnectionInfo connectionInfo = RedisConnectionConfiguration.parseUrl(this.properties.getUrl());
 			return connectionInfo.getPassword();
 		}
 		return this.properties.getPassword();
@@ -57,17 +57,13 @@ public String getPassword() {
 	@Override
 	public Standalone getStandalone() {
 		if (this.properties.getUrl() != null) {
-			ConnectionInfo connectionInfo = connectionInfo(this.properties.getUrl());
+			ConnectionInfo connectionInfo = RedisConnectionConfiguration.parseUrl(this.properties.getUrl());
 			return Standalone.of(connectionInfo.getUri().getHost(), connectionInfo.getUri().getPort(),
 					this.properties.getDatabase());
 		}
 		return Standalone.of(this.properties.getHost(), this.properties.getPort(), this.properties.getDatabase());
 	}
 
-	private ConnectionInfo connectionInfo(String url) {
-		return (url != null) ? RedisConnectionConfiguration.parseUrl(url) : null;
-	}
-
 	@Override
 	public Sentinel getSentinel() {
 		org.springframework.boot.autoconfigure.data.redis.RedisProperties.Sentinel sentinel = this.properties