Skip to content

Commit 6d67bdf

Browse files
committed
Polishing
1 parent 97c8628 commit 6d67bdf

File tree

3 files changed

+16
-14
lines changed

3 files changed

+16
-14
lines changed

spring-beans/src/main/java/org/springframework/beans/DirectFieldAccessor.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2018 the original author or authors.
2+
* Copyright 2002-2020 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -92,8 +92,7 @@ protected DirectFieldAccessor newNestedPropertyAccessor(Object object, String ne
9292
@Override
9393
protected NotWritablePropertyException createNotWritablePropertyException(String propertyName) {
9494
PropertyMatches matches = PropertyMatches.forField(propertyName, getRootClass());
95-
throw new NotWritablePropertyException(
96-
getRootClass(), getNestedPath() + propertyName,
95+
throw new NotWritablePropertyException(getRootClass(), getNestedPath() + propertyName,
9796
matches.buildErrorMessage(), matches.getPossibleMatches());
9897
}
9998

spring-jdbc/src/main/java/org/springframework/jdbc/core/metadata/CallMetaDataContext.java

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -637,21 +637,23 @@ public String createCallString() {
637637
schemaNameToUse = this.metaDataProvider.schemaNameToUse(getSchemaName());
638638
}
639639

640-
String procedureNameToUse = this.metaDataProvider.procedureNameToUse(getProcedureName());
641640
if (isFunction() || isReturnValueRequired()) {
642-
callString = new StringBuilder().append("{? = call ").
643-
append(StringUtils.hasLength(catalogNameToUse) ? catalogNameToUse + "." : "").
644-
append(StringUtils.hasLength(schemaNameToUse) ? schemaNameToUse + "." : "").
645-
append(procedureNameToUse).append("(");
641+
callString = new StringBuilder("{? = call ");
646642
parameterCount = -1;
647643
}
648644
else {
649-
callString = new StringBuilder().append("{call ").
650-
append(StringUtils.hasLength(catalogNameToUse) ? catalogNameToUse + "." : "").
651-
append(StringUtils.hasLength(schemaNameToUse) ? schemaNameToUse + "." : "").
652-
append(procedureNameToUse).append("(");
645+
callString = new StringBuilder("{call ");
653646
}
654647

648+
if (StringUtils.hasLength(catalogNameToUse)) {
649+
callString.append(catalogNameToUse).append(".");
650+
}
651+
if (StringUtils.hasLength(schemaNameToUse)) {
652+
callString.append(schemaNameToUse).append(".");
653+
}
654+
callString.append(this.metaDataProvider.procedureNameToUse(getProcedureName()));
655+
callString.append("(");
656+
655657
for (SqlParameter parameter : this.callParameters) {
656658
if (!parameter.isResultsParameter()) {
657659
if (parameterCount > 0) {

spring-webmvc/src/test/java/org/springframework/web/servlet/DispatcherServletTests.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2019 the original author or authors.
2+
* Copyright 2002-2020 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -84,7 +84,7 @@ public class DispatcherServletTests {
8484

8585

8686
@BeforeEach
87-
public void setUp() throws ServletException {
87+
public void setup() throws ServletException {
8888
MockServletConfig complexConfig = new MockServletConfig(getServletContext(), "complex");
8989
complexConfig.addInitParameter("publishContext", "false");
9090
complexConfig.addInitParameter("class", "notWritable");
@@ -105,6 +105,7 @@ private ServletContext getServletContext() {
105105
return servletConfig.getServletContext();
106106
}
107107

108+
108109
@Test
109110
public void configuredDispatcherServlets() {
110111
assertThat(("simple" + FrameworkServlet.DEFAULT_NAMESPACE_SUFFIX).equals(simpleDispatcherServlet.getNamespace())).as("Correct namespace").isTrue();

0 commit comments

Comments
 (0)