Skip to content

Commit 17fe64e

Browse files
committed
Cleanup: no logical changes
Resolved warnings, updated license years and reformatted some lines.
1 parent f00184e commit 17fe64e

File tree

3 files changed

+13
-14
lines changed

3 files changed

+13
-14
lines changed

src/test/java/org/apache/ibatis/submitted/sqlprovider/BaseMapper.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Copyright 2009-2018 the original author or authors.
2+
* Copyright 2009-2019 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.

src/test/java/org/apache/ibatis/submitted/sqlprovider/OurSqlBuilder.java

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Copyright 2009-2018 the original author or authors.
2+
* Copyright 2009-2019 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.
@@ -219,7 +219,7 @@ public String buildSelectByIdAndNameMultipleParamAndProviderContext(final Intege
219219
}}.toString();
220220
}
221221

222-
private Class getEntityClass(ProviderContext providerContext){
222+
private Class<?> getEntityClass(ProviderContext providerContext) {
223223
Method mapperMethod = providerContext.getMapperMethod();
224224
Class<?> declaringClass = mapperMethod.getDeclaringClass();
225225
Class<?> mapperClass = providerContext.getMapperType();
@@ -234,27 +234,26 @@ private Class getEntityClass(ProviderContext providerContext){
234234
}
235235
}
236236
}
237-
throw new RuntimeException("The interface ["
238-
+ mapperClass.getCanonicalName() + "] must specify a generic type.");
237+
throw new RuntimeException("The interface [" + mapperClass.getCanonicalName() + "] must specify a generic type.");
239238
}
240239

241-
private Map<String, String> getColumnMap(ProviderContext context){
242-
Class entityClass = getEntityClass(context);
240+
private Map<String, String> getColumnMap(ProviderContext context) {
241+
Class<?> entityClass = getEntityClass(context);
243242
Field[] fields = entityClass.getDeclaredFields();
244243
Map<String, String> columnMap = new LinkedHashMap<String, String>();
245244
for (Field field : fields) {
246245
BaseMapper.Column column = field.getAnnotation(BaseMapper.Column.class);
247-
if(column != null){
246+
if (column != null) {
248247
String columnName = column.value();
249-
if(columnName == null || columnName.length() == 0){
248+
if (columnName == null || columnName.length() == 0) {
250249
columnName = field.getName();
251250
}
252251
columnMap.put(columnName, field.getName());
253252
}
254253
}
255-
if(columnMap.size() == 0){
256-
throw new RuntimeException("There is no field in the class ["
257-
+ entityClass.getCanonicalName() + "] that specifies the @BaseMapper.Column annotation.");
254+
if (columnMap.size() == 0) {
255+
throw new RuntimeException("There is no field in the class [" + entityClass.getCanonicalName()
256+
+ "] that specifies the @BaseMapper.Column annotation.");
258257
}
259258
return columnMap;
260259
}
@@ -298,7 +297,7 @@ public String buildUpdateSelective(ProviderContext context) {
298297
sqlBuffer.append("</if>");
299298
}
300299
sqlBuffer.append("</set>");
301-
//For simplicity, there is no @Id annotation here, using default id directly
300+
// For simplicity, there is no @Id annotation here, using default id directly
302301
sqlBuffer.append("where id = #{id}");
303302
sqlBuffer.append("</script>");
304303
return sqlBuffer.toString();

src/test/java/org/apache/ibatis/submitted/sqlprovider/User.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Copyright 2009-2015 the original author or authors.
2+
* Copyright 2009-2019 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.

0 commit comments

Comments
 (0)