From 69e6958aa24e3b78e06006351c4115f7dfbe0a9d Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Mon, 16 Mar 2020 15:16:47 +0100 Subject: [PATCH] DATACMNS-1683 - Polishing. Trim trailing whitespaces. Original pull request: #434. --- .../repository/query/SpelQueryContext.java | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/main/java/org/springframework/data/repository/query/SpelQueryContext.java b/src/main/java/org/springframework/data/repository/query/SpelQueryContext.java index 8d338b42c..8767f2bc1 100644 --- a/src/main/java/org/springframework/data/repository/query/SpelQueryContext.java +++ b/src/main/java/org/springframework/data/repository/query/SpelQueryContext.java @@ -67,11 +67,11 @@ public class SpelQueryContext { /** * Parses the query for SpEL expressions using the pattern: - * + * *
 	 * <prefix>#{<spel>}
 	 * 
- * + * * with prefix being the character ':' or '?'. Parsing honors quoted {@literal String}s enclosed in single or double * quotation marks. * @@ -86,7 +86,7 @@ public class SpelQueryContext { /** * Createsa {@link EvaluatingSpelQueryContext} from the current one and the given * {@link QueryMethodEvaluationContextProvider}. - * + * * @param provider must not be {@literal null}. * @return */ @@ -111,7 +111,7 @@ public class SpelQueryContext { /** * Creates a new {@link EvaluatingSpelQueryContext} for the given {@link QueryMethodEvaluationContextProvider}, * parameter name source and replacement source. - * + * * @param evaluationContextProvider must not be {@literal null}. * @param parameterNameSource must not be {@literal null}. * @param replacementSource must not be {@literal null}. @@ -126,11 +126,11 @@ public class SpelQueryContext { /** * Parses the query for SpEL expressions using the pattern: - * + * *
 		 * <prefix>#{<spel>}
 		 * 
- * + * * with prefix being the character ':' or '?'. Parsing honors quoted {@literal String}s enclosed in single or double * quotation marks. * @@ -165,7 +165,7 @@ public class SpelQueryContext { /** * Creates a SpelExtractor from a query String. - * + * * @param query must not be {@literal null}. */ SpelExtractor(String query) { @@ -184,7 +184,7 @@ public class SpelQueryContext { if (quotedAreas.isQuoted(matcher.start())) { - resultQuery.append(query.substring(matchedUntil, matcher.end())); + resultQuery.append(query, matchedUntil, matcher.end()); } else { @@ -194,7 +194,7 @@ public class SpelQueryContext { String parameterName = parameterNameSource.apply(expressionCounter, spelExpression); String replacement = replacementSource.apply(prefix, parameterName); - resultQuery.append(query.substring(matchedUntil, matcher.start())); + resultQuery.append(query, matchedUntil, matcher.start()); resultQuery.append(replacement); expressions.put(parameterName, spelExpression); @@ -230,7 +230,7 @@ public class SpelQueryContext { /** * A {@literal Map} from parameter name to SpEL expression. - * + * * @return Guaranteed to be not {@literal null}. */ Map getParameterMap() { @@ -258,7 +258,7 @@ public class SpelQueryContext { /** * Creates a new {@link QuotationMap} for the query. - * + * * @param query can be {@literal null}. */ public QuotationMap(@Nullable String query) {