Merge branch 1.3.x
This commit is contained in:
		
						commit
						6575ca6ff8
					
				| 
						 | 
					@ -57,8 +57,9 @@ class JooqExceptionTranslator extends DefaultExecuteListener {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	private SQLExceptionTranslator getTranslator(ExecuteContext context) {
 | 
						private SQLExceptionTranslator getTranslator(ExecuteContext context) {
 | 
				
			||||||
		SQLDialect dialect = context.configuration().dialect();
 | 
							SQLDialect dialect = context.configuration().dialect();
 | 
				
			||||||
		if (dialect != null) {
 | 
							if (dialect != null && dialect.thirdParty() != null) {
 | 
				
			||||||
			return new SQLErrorCodeSQLExceptionTranslator(dialect.thirdParty().springDbName());
 | 
								return new SQLErrorCodeSQLExceptionTranslator(
 | 
				
			||||||
 | 
										dialect.thirdParty().springDbName());
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
		return new SQLStateSQLExceptionTranslator();
 | 
							return new SQLStateSQLExceptionTranslator();
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -39,7 +39,6 @@ import static org.mockito.Mockito.verify;
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 * @author Andy Wilkinson
 | 
					 * @author Andy Wilkinson
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
					 | 
				
			||||||
@RunWith(Parameterized.class)
 | 
					@RunWith(Parameterized.class)
 | 
				
			||||||
public class JooqExceptionTranslatorTests {
 | 
					public class JooqExceptionTranslatorTests {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -118,15 +118,14 @@ class TypeElementMembers {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	private boolean isSetter(ExecutableElement method) {
 | 
						private boolean isSetter(ExecutableElement method) {
 | 
				
			||||||
		final String name = method.getSimpleName().toString();
 | 
							final String name = method.getSimpleName().toString();
 | 
				
			||||||
		return (name.startsWith("set") && name.length() > 3)
 | 
							return (name.startsWith("set") && name.length() > 3
 | 
				
			||||||
				&& method.getParameters().size() == 1
 | 
									&& method.getParameters().size() == 1 && isSetterReturnType(method));
 | 
				
			||||||
				&& (isSetterReturnType(method));
 | 
					 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	private boolean isSetterReturnType(ExecutableElement method) {
 | 
						private boolean isSetterReturnType(ExecutableElement method) {
 | 
				
			||||||
		return (TypeKind.VOID == method.getReturnType().getKind()
 | 
							TypeMirror returnType = method.getReturnType();
 | 
				
			||||||
				|| this.env.getTypeUtils().isSameType(
 | 
							return (TypeKind.VOID == returnType.getKind() || this.env.getTypeUtils()
 | 
				
			||||||
						method.getEnclosingElement().asType(), method.getReturnType()));
 | 
									.isSameType(method.getEnclosingElement().asType(), returnType));
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	private String getAccessorName(String methodName) {
 | 
						private String getAccessorName(String methodName) {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -27,6 +27,7 @@ import org.springframework.boot.configurationsample.ConfigurationProperties;
 | 
				
			||||||
public class InvalidAccessorProperties {
 | 
					public class InvalidAccessorProperties {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	private String name;
 | 
						private String name;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	private boolean flag;
 | 
						private boolean flag;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	public void set(String name) {
 | 
						public void set(String name) {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue