From 36350012225d15264bfd5165d0a5f3fd2a052668 Mon Sep 17 00:00:00 2001 From: Max <56247279+the-magic-max@users.noreply.github.com> Date: Wed, 15 Jan 2020 15:43:57 +0100 Subject: [PATCH] Redundant Variable 'config' Instead of initializing a local variable first and then return it, you could directly return a new Builder instance. -> return new Builder().uri(URL).build(); --- .../data/neo4j/config/MovieDatabaseNeo4jConfiguration.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/persistence-modules/spring-data-neo4j/src/main/java/com/baeldung/spring/data/neo4j/config/MovieDatabaseNeo4jConfiguration.java b/persistence-modules/spring-data-neo4j/src/main/java/com/baeldung/spring/data/neo4j/config/MovieDatabaseNeo4jConfiguration.java index 9bbc571aee..4e87c24614 100644 --- a/persistence-modules/spring-data-neo4j/src/main/java/com/baeldung/spring/data/neo4j/config/MovieDatabaseNeo4jConfiguration.java +++ b/persistence-modules/spring-data-neo4j/src/main/java/com/baeldung/spring/data/neo4j/config/MovieDatabaseNeo4jConfiguration.java @@ -16,8 +16,7 @@ public class MovieDatabaseNeo4jConfiguration { @Bean public org.neo4j.ogm.config.Configuration getConfiguration() { - org.neo4j.ogm.config.Configuration config = new Builder().uri(URL).build(); - return config; + return new Builder().uri(URL).build(); } @Bean