Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ public ResultMap addResultMap(String id, Class<?> type, String extend, Discrimin

if (extend != null) {
if (!configuration.hasResultMap(extend)) {
throw new IncompleteElementException("Could not find a parent resultmap with id '" + extend + "'");
throw new IncompleteElementException("Could not find a parent resultMap with id '" + extend + "'");
}
ResultMap resultMap = configuration.getResultMap(extend);
List<ResultMapping> extendedResultMappings = new ArrayList<>(resultMap.getResultMappings());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,16 +96,16 @@ public class DefaultResultSetHandler implements ResultSetHandler {
// pending creations property tracker
private final Map<Object, PendingRelation> pendingPccRelations = new IdentityHashMap<>();

// nested resultmaps
// nested resultMaps
private final Map<CacheKey, Object> nestedResultObjects = new HashMap<>();
private final Map<String, Object> ancestorObjects = new HashMap<>();
private Object previousRowValue;

// multiple resultsets
// multiple resultSets
private final Map<String, ResultMapping> nextResultMaps = new HashMap<>();
private final Map<CacheKey, List<PendingRelation>> pendingRelations = new HashMap<>();

// Cached Automappings
// Cached AutoMappings
private final Map<String, List<UnMappedColumnAutoMapping>> autoMappingsCache = new HashMap<>();
private final Map<String, List<String>> constructorAutoMappingColumns = new HashMap<>();

Expand Down Expand Up @@ -199,7 +199,7 @@ private void handleRefCursorOutputParameter(ResultSet rs, ParameterMapping param
handleRowValues(rsw, resultMap, resultHandler, new RowBounds(), null);
}
} finally {
// issue #228 (close resultsets)
// issue #228 (close resultSets)
closeResultSet(rs);
}
}
Expand Down Expand Up @@ -276,12 +276,12 @@ private ResultSetWrapper getFirstResultSet(Statement stmt) throws SQLException {

try {
while (rs == null) {
// move forward to get the first resultset in case the driver
// doesn't return the resultset as the first result (HSQLDB)
// move forward to get the first resultSet in case the driver
// doesn't return the resultSet as the first result (HSQLDB)
if (stmt.getMoreResults()) {
rs = stmt.getResultSet();
} else if (stmt.getUpdateCount() == -1) {
// no more results. Must be no resultset
// no more results. Must be no resultSet
break;
}
}
Expand Down Expand Up @@ -350,7 +350,7 @@ private void handleResultSet(ResultSetWrapper rsw, ResultMap resultMap, List<Obj
handleRowValues(rsw, resultMap, resultHandler, rowBounds, null);
}
} finally {
// issue #228 (close resultsets)
// issue #228 (close resultSets)
closeResultSet(rsw.getResultSet());
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/org/apache/ibatis/mapping/ParameterMapping.java
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,8 @@ public ParameterMapping build() {

private void validate() {
if (ResultSet.class.equals(parameterMapping.javaType) && parameterMapping.resultMapId == null) {
throw new IllegalStateException("Missing resultmap in property '" + parameterMapping.property + "'. "
+ "Parameters of type java.sql.ResultSet require a resultmap.");
throw new IllegalStateException("Missing resultMap in property '" + parameterMapping.property + "'. "
+ "Parameters of type java.sql.ResultSet require a resultMap.");
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/apache/ibatis/mapping/ResultMapping.java
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ private void validate() {
throw new IllegalStateException(
"Cannot define both nestedQueryId and nestedResultMapId in property " + resultMapping.property);
}
// Issue #4 and GH #39: column is optional only in nested resultmaps but not in the rest
// Issue #4 and GH #39: column is optional only in nested resultMaps but not in the rest
if (resultMapping.nestedResultMapId == null && resultMapping.column == null
&& resultMapping.composites.isEmpty()) {
throw new IllegalStateException("Mapping is missing column attribute for property " + resultMapping.property);
Expand Down
4 changes: 2 additions & 2 deletions src/test/java/org/apache/ibatis/plugin/PluginTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -92,13 +92,13 @@ void shouldPluginNotInvokeArbitraryMethod() {
map = (Map<?, ?>) new AlwaysMapPlugin().plugin(map);
try {
map.get("Anything");
fail("Exected IllegalArgumentException, but no exception was thrown.");
fail("Expected IllegalArgumentException, but no exception was thrown.");
} catch (IllegalArgumentException e) {
assertEquals(
"Method 'public abstract java.lang.Object java.util.Map.get(java.lang.Object)' is not supported as a plugin target.",
e.getMessage());
} catch (Exception e) {
fail("Exected IllegalArgumentException, but was " + e.getClass(), e);
fail("Expected IllegalArgumentException, but was " + e.getClass(), e);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ void overwriteWithDefault() {
// <result property="field4" column="field3" jdbcType="INTEGER"/>
Assertions.assertEquals(inserted.getField3(), selected.getField4());

// field4 is explicitly remapped to field3 in the resultmap
// field4 is explicitly remapped to field3 in the resultMap
// <result property="field3" column="field4" jdbcType="INTEGER"/>
Assertions.assertEquals(inserted.getField4(), selected.getField3());

Expand Down