Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

typo: fix some typo #2941

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -14,6 +14,6 @@
* limitations under the License.
*/
/**
* Parses annotions to create a Configuration.
* Parses annotations to create a Configuration.
*/
package org.apache.ibatis.builder.annotation;
2 changes: 1 addition & 1 deletion src/main/java/org/apache/ibatis/jdbc/ScriptRunner.java
Expand Up @@ -248,7 +248,7 @@ private void executeStatement(String command) throws SQLException {
}
try {
boolean hasResults = statement.execute(sql);
// DO NOT try to 'imporove' the condition even if IDE tells you to!
// DO NOT try to 'improve' the condition even if IDE tells you to!
// It's important that getUpdateCount() is called here.
while (!(!hasResults && statement.getUpdateCount() == -1)) {
checkWarnings(statement);
Expand Down
4 changes: 2 additions & 2 deletions src/test/java/org/apache/ibatis/binding/BindingTest.java
Expand Up @@ -626,7 +626,7 @@ void shouldCacheMapperMethod() throws Exception {
void shouldGetBlogsWithAuthorsAndPosts() {
try (SqlSession session = sqlSessionFactory.openSession()) {
BoundBlogMapper mapper = session.getMapper(BoundBlogMapper.class);
List<Blog> blogs = mapper.selectBlogsWithAutorAndPosts();
List<Blog> blogs = mapper.selectBlogsWithAuthorAndPosts();
assertEquals(2, blogs.size());
assertTrue(blogs.get(0) instanceof Proxy);
assertEquals(101, blogs.get(0).getAuthor().getId());
Expand All @@ -643,7 +643,7 @@ void shouldGetBlogsWithAuthorsAndPosts() {
void shouldGetBlogsWithAuthorsAndPostsEagerly() {
try (SqlSession session = sqlSessionFactory.openSession()) {
BoundBlogMapper mapper = session.getMapper(BoundBlogMapper.class);
List<Blog> blogs = mapper.selectBlogsWithAutorAndPostsEagerly();
List<Blog> blogs = mapper.selectBlogsWithAuthorAndPostsEagerly();
assertEquals(2, blogs.size());
assertFalse(blogs.get(0) instanceof Factory);
assertEquals(101, blogs.get(0).getAuthor().getId());
Expand Down
4 changes: 2 additions & 2 deletions src/test/java/org/apache/ibatis/binding/BoundBlogMapper.java
Expand Up @@ -253,7 +253,7 @@ Blog selectBlogWithAParamNamedValue(@Param("column") String column, @Param("id")
@Result(property = "posts", column = "id", many = @Many(select = "selectPostsById"))
})
// @formatter:on
List<Blog> selectBlogsWithAutorAndPosts();
List<Blog> selectBlogsWithAuthorAndPosts();

// @formatter:off
@Select({
Expand All @@ -265,6 +265,6 @@ Blog selectBlogWithAParamNamedValue(@Param("column") String column, @Param("id")
@Result(property = "posts", column = "id", many = @Many(select = "selectPostsById", fetchType = FetchType.EAGER))
})
// @formatter:on
List<Blog> selectBlogsWithAutorAndPostsEagerly();
List<Blog> selectBlogsWithAuthorAndPostsEagerly();

}
Expand Up @@ -71,7 +71,7 @@ void shouldLetCallALoadedProperty() {
}

@Test
void shouldSerizalizeADeserlizaliedProxy() throws Exception {
void shouldSerializeADeserializedProxy() throws Exception {
Object proxy = ((CglibProxyFactory) proxyFactory).createDeserializationProxy(author, new HashMap<>(),
new DefaultObjectFactory(), new ArrayList<>(), new ArrayList<>());
Author author2 = (Author) deserialize(serialize((Serializable) proxy));
Expand Down
Expand Up @@ -69,7 +69,7 @@ void shouldLetCallALoadedProperty() {
}

@Test
void shouldSerizalizeADeserlizaliedProxy() throws Exception {
void shouldSerializeADeserializedProxy() throws Exception {
Object proxy = ((JavassistProxyFactory) proxyFactory).createDeserializationProxy(author, new HashMap<>(),
new DefaultObjectFactory(), new ArrayList<>(), new ArrayList<>());
Author author2 = (Author) deserialize(serialize((Serializable) proxy));
Expand Down
Expand Up @@ -110,7 +110,7 @@ void shouldSerializeAProxyForABeanWithoutDefaultConstructorAndUnloadedProperties
}

@Test
void shouldSerizaliceAFullLoadedObjectToOriginalClass() throws Exception {
void shouldSerializeAFullLoadedObjectToOriginalClass() throws Exception {
Object proxy = proxyFactory.createProxy(author, new ResultLoaderMap(), new Configuration(),
new DefaultObjectFactory(), new ArrayList<>(), new ArrayList<>());
Object proxy2 = deserialize(serialize((Serializable) proxy));
Expand Down
Expand Up @@ -91,7 +91,7 @@ void testGetConfiguredTemplate() {
templateName = ExternalResources.getConfiguredTemplate(tempFile.getAbsolutePath(), "new_command.template");
assertEquals("templates/col_new_template_migration.sql", templateName);
} catch (Exception e) {
fail("Test failed with execption: " + e.getMessage());
fail("Test failed with exception: " + e.getMessage());
}
}

Expand Down
4 changes: 2 additions & 2 deletions src/test/java/org/apache/ibatis/jdbc/ScriptRunnerTest.java
Expand Up @@ -115,7 +115,7 @@ void shouldReturnWarningIfEndOfLineTerminatorNotFound() throws Exception {
}

@Test
void commentAferStatementDelimiterShouldNotCauseRunnerFail() throws Exception {
void commentAfterStatementDelimiterShouldNotCauseRunnerFail() throws Exception {
DataSource ds = createUnpooledDataSource(JPETSTORE_PROPERTIES);
String resource = "org/apache/ibatis/jdbc/ScriptCommentAfterEOLTerminator.sql";
try (Connection conn = ds.getConnection(); Reader reader = Resources.getResourceAsReader(resource)) {
Expand Down Expand Up @@ -185,7 +185,7 @@ void testLogging() throws Exception {
}

@Test
void testLoggingFullScipt() throws Exception {
void testLoggingFullScript() throws Exception {
DataSource ds = createUnpooledDataSource(JPETSTORE_PROPERTIES);
try (Connection conn = ds.getConnection()) {
ScriptRunner runner = new ScriptRunner(conn);
Expand Down
Expand Up @@ -38,7 +38,7 @@ void shouldThrowErrorWhenBothResultMapAndNestedSelectAreSet() {

// Issue 4: column is mandatory on nested queries
@Test
void shouldFailWithAMissingColumnInNetstedSelect() {
void shouldFailWithAMissingColumnInNestedSelect() {
Assertions.assertThrows(IllegalStateException.class,
() -> new ResultMapping.Builder(configuration, "prop").nestedQueryId("nested query ID").build());
}
Expand Down
Expand Up @@ -55,7 +55,7 @@ void shouldGetAUser() {
}

@Test
void shouldGetAUserWhithPhoneNumber() {
void shouldGetAUserWithPhoneNumber() {
sqlSessionFactory.getConfiguration().setAutoMappingBehavior(AutoMappingBehavior.NONE);
try (SqlSession sqlSession = sqlSessionFactory.openSession()) {
Mapper mapper = sqlSession.getMapper(Mapper.class);
Expand Down
Expand Up @@ -118,7 +118,7 @@ void testUpdateShouldFlushLocalCache() {
}

@Test
void testSelectShouldFlushLocalCacheIfFlushLocalCacheAtferEachStatementIsTrue() throws SQLException {
void testSelectShouldFlushLocalCacheIfFlushLocalCacheAfterEachStatementIsTrue() throws SQLException {
sqlSessionFactory.getConfiguration().setLocalCacheScope(LocalCacheScope.STATEMENT);
try (SqlSession sqlSession = sqlSessionFactory.openSession(ExecutorType.SIMPLE)) {
PersonMapper personMapper = sqlSession.getMapper(PersonMapper.class);
Expand Down
Expand Up @@ -197,7 +197,7 @@ void shouldAssignKeysToNamedList() {
}

@Test
void shouldAssingKeysToCollection() {
void shouldAssignKeysToCollection() {
try (SqlSession sqlSession = sqlSessionFactory.openSession()) {
try {
CountryMapper mapper = sqlSession.getMapper(CountryMapper.class);
Expand All @@ -215,7 +215,7 @@ void shouldAssingKeysToCollection() {
}

@Test
void shouldAssingKeysToNamedCollection() {
void shouldAssignKeysToNamedCollection() {
try (SqlSession sqlSession = sqlSessionFactory.openSession()) {
try {
CountryMapper mapper = sqlSession.getMapper(CountryMapper.class);
Expand All @@ -233,7 +233,7 @@ void shouldAssingKeysToNamedCollection() {
}

@Test
void shouldAssingKeysToArray() {
void shouldAssignKeysToArray() {
try (SqlSession sqlSession = sqlSessionFactory.openSession()) {
try {
CountryMapper mapper = sqlSession.getMapper(CountryMapper.class);
Expand All @@ -251,7 +251,7 @@ void shouldAssingKeysToArray() {
}

@Test
void shouldAssingKeysToNamedArray() {
void shouldAssignKeysToNamedArray() {
try (SqlSession sqlSession = sqlSessionFactory.openSession()) {
try {
CountryMapper mapper = sqlSession.getMapper(CountryMapper.class);
Expand Down Expand Up @@ -595,7 +595,7 @@ void shouldAssignKeyToAParamWithTrickyName() {
}

@Test
void shouldAssingKeysToAMap() {
void shouldAssignKeysToAMap() {
try (SqlSession sqlSession = sqlSessionFactory.openSession()) {
try {
CountryMapper mapper = sqlSession.getMapper(CountryMapper.class);
Expand Down
Expand Up @@ -155,16 +155,16 @@ void verifyCustomLazyLoadTriggerMethods() {

@Test
void shouldInvokingSetterInvalidateLazyLoading_Javassist() {
shoulInvokingSetterInvalidateLazyLoading(new JavassistProxyFactory());
shouldInvokingSetterInvalidateLazyLoading(new JavassistProxyFactory());
}

@Tag("RequireIllegalAccess")
@Test
void shouldInvokingSetterInvalidateLazyLoading_Cglib() {
shoulInvokingSetterInvalidateLazyLoading(new CglibProxyFactory());
shouldInvokingSetterInvalidateLazyLoading(new CglibProxyFactory());
}

private void shoulInvokingSetterInvalidateLazyLoading(ProxyFactory proxyFactory) {
private void shouldInvokingSetterInvalidateLazyLoading(ProxyFactory proxyFactory) {
Configuration config = sqlSessionFactory.getConfiguration();
config.setProxyFactory(proxyFactory);
config.setAggressiveLazyLoading(false);
Expand Down
Expand Up @@ -26,7 +26,7 @@
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;

class ResulthandlerTest {
class ResultHandlerTest {

private static SqlSessionFactory sqlSessionFactory;

Expand Down
Expand Up @@ -25,7 +25,7 @@

import org.junit.jupiter.api.Test;

class SqlTimetampTypeHandlerTest extends BaseTypeHandlerTest {
class SqlTimestampTypeHandlerTest extends BaseTypeHandlerTest {

private static final TypeHandler<Timestamp> TYPE_HANDLER = new SqlTimestampTypeHandler();
private static final java.sql.Timestamp SQL_TIME = new java.sql.Timestamp(new Date().getTime());
Expand Down