From a48851509735d85db4632a6eff2de2248299db40 Mon Sep 17 00:00:00 2001 From: Sam Brannen Date: Wed, 16 Jul 2014 18:12:59 +0200 Subject: [PATCH] Simplify logic in MergedSqlConfig --- .../test/context/jdbc/MergedSqlConfig.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/spring-test/src/main/java/org/springframework/test/context/jdbc/MergedSqlConfig.java b/spring-test/src/main/java/org/springframework/test/context/jdbc/MergedSqlConfig.java index f19c7298376..96da9191e57 100644 --- a/spring-test/src/main/java/org/springframework/test/context/jdbc/MergedSqlConfig.java +++ b/spring-test/src/main/java/org/springframework/test/context/jdbc/MergedSqlConfig.java @@ -74,7 +74,7 @@ class MergedSqlConfig { private static String retrieveSeparator(AnnotationAttributes attributes) { String separator = attributes.getString("separator"); - if (separator != null && separator.equals("")) { + if ("".equals(separator)) { separator = ScriptUtils.DEFAULT_STATEMENT_SEPARATOR; } return separator; @@ -82,7 +82,7 @@ class MergedSqlConfig { private static String retrieveCommentPrefix(AnnotationAttributes attributes) { String commentPrefix = attributes.getString("commentPrefix"); - if (commentPrefix != null && commentPrefix.equals("")) { + if ("".equals(commentPrefix)) { commentPrefix = ScriptUtils.DEFAULT_COMMENT_PREFIX; } return commentPrefix; @@ -90,7 +90,7 @@ class MergedSqlConfig { private static String retrieveBlockCommentStartDelimiter(AnnotationAttributes attributes) { String blockCommentStartDelimiter = attributes.getString("blockCommentStartDelimiter"); - if (blockCommentStartDelimiter != null && blockCommentStartDelimiter.equals("")) { + if ("".equals(blockCommentStartDelimiter)) { blockCommentStartDelimiter = ScriptUtils.DEFAULT_BLOCK_COMMENT_START_DELIMITER; } return blockCommentStartDelimiter; @@ -98,7 +98,7 @@ class MergedSqlConfig { private static String retrieveBlockCommentEndDelimiter(AnnotationAttributes attributes) { String blockCommentEndDelimiter = attributes.getString("blockCommentEndDelimiter"); - if (blockCommentEndDelimiter != null && blockCommentEndDelimiter.equals("")) { + if ("".equals(blockCommentEndDelimiter)) { blockCommentEndDelimiter = ScriptUtils.DEFAULT_BLOCK_COMMENT_END_DELIMITER; } return blockCommentEndDelimiter;