Skip to content

Commit 45846b0

Browse files
authored
Merge pull request #1927 from hazendaz/copyright
[ci] Improve formatting within subset of tests
2 parents 13715f0 + 45ad7ef commit 45846b0

File tree

69 files changed

+1602
-1547
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

69 files changed

+1602
-1547
lines changed

src/test/java/org/apache/ibatis/submitted/heavy_initial_load/Code.java

Lines changed: 1001 additions & 1001 deletions
Large diffs are not rendered by default.

src/test/java/org/apache/ibatis/submitted/heavy_initial_load/HeavyInitialLoadTest.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Copyright 2009-2019 the original author or authors.
2+
* Copyright 2009-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.
@@ -34,7 +34,8 @@ class HeavyInitialLoadTest {
3434

3535
@BeforeAll
3636
static void initSqlSessionFactory() throws Exception {
37-
try (Reader reader = Resources.getResourceAsReader("org/apache/ibatis/submitted/heavy_initial_load/ibatisConfig.xml")) {
37+
try (Reader reader = Resources
38+
.getResourceAsReader("org/apache/ibatis/submitted/heavy_initial_load/ibatisConfig.xml")) {
3839
sqlSessionFactory = new SqlSessionFactoryBuilder().build(reader);
3940
}
4041

@@ -66,7 +67,7 @@ void selectThingsConcurrently_mybatis_issue_224() throws Exception {
6667
threads[i] = new Thread(() -> {
6768
try {
6869
selectThing();
69-
} catch(Exception exception) {
70+
} catch (Exception exception) {
7071
throwables.add(exception);
7172
}
7273
});

src/test/java/org/apache/ibatis/submitted/immutable_constructor/ImmutablePOJOTest.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,13 @@ final class ImmutablePOJOTest {
3838

3939
@BeforeAll
4040
static void setupClass() throws Exception {
41-
try (Reader reader = Resources.getResourceAsReader("org/apache/ibatis/submitted/immutable_constructor/ibatisConfig.xml")) {
41+
try (Reader reader = Resources
42+
.getResourceAsReader("org/apache/ibatis/submitted/immutable_constructor/ibatisConfig.xml")) {
4243
factory = new SqlSessionFactoryBuilder().build(reader);
4344
}
4445

4546
BaseDataTest.runScript(factory.getConfiguration().getEnvironment().getDataSource(),
46-
"org/apache/ibatis/submitted/immutable_constructor/CreateDB.sql");
47+
"org/apache/ibatis/submitted/immutable_constructor/CreateDB.sql");
4748
}
4849

4950
@Test

src/test/java/org/apache/ibatis/submitted/includes/IncludeTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,11 @@ static void setUp() throws Exception {
4040

4141
// populate in-memory database
4242
BaseDataTest.runScript(sqlSessionFactory.getConfiguration().getEnvironment().getDataSource(),
43-
"org/apache/ibatis/submitted/includes/CreateDB.sql");
43+
"org/apache/ibatis/submitted/includes/CreateDB.sql");
4444
}
4545

4646
@Test
47-
void testIncludes() {
47+
void testIncludes() {
4848
try (SqlSession sqlSession = sqlSessionFactory.openSession()) {
4949
final Integer result = sqlSession.selectOne("org.apache.ibatis.submitted.includes.mapper.selectWithProperty");
5050
Assertions.assertEquals(Integer.valueOf(1), result);

src/test/java/org/apache/ibatis/submitted/inheritance/InheritanceTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Copyright 2009-2019 the original author or authors.
2+
* Copyright 2009-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.
@@ -40,7 +40,7 @@ static void setUp() throws Exception {
4040

4141
// populate in-memory database
4242
BaseDataTest.runScript(sqlSessionFactory.getConfiguration().getEnvironment().getDataSource(),
43-
"org/apache/ibatis/submitted/inheritance/CreateDB.sql");
43+
"org/apache/ibatis/submitted/inheritance/CreateDB.sql");
4444
}
4545

4646
@Test

src/test/java/org/apache/ibatis/submitted/initialized_collection_property/AuthorDAOTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ static void testGetMessageForEmptyDatabase() throws Exception {
4141
}
4242

4343
BaseDataTest.runScript(factory.getConfiguration().getEnvironment().getDataSource(),
44-
"org/apache/ibatis/submitted/initialized_collection_property/create.sql");
44+
"org/apache/ibatis/submitted/initialized_collection_property/create.sql");
4545
}
4646

4747
@Test

src/test/java/org/apache/ibatis/submitted/inline_association_with_dot/InlineCollectionWithDotTest.java

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public void openSession(String aConfig) throws Exception {
3939
SqlSessionFactory sqlSessionFactory = new SqlSessionFactoryBuilder().build(batisConfigReader);
4040

4141
BaseDataTest.runScript(sqlSessionFactory.getConfiguration().getEnvironment().getDataSource(),
42-
"org/apache/ibatis/submitted/inline_association_with_dot/create.sql");
42+
"org/apache/ibatis/submitted/inline_association_with_dot/create.sql");
4343

4444
sqlSession = sqlSessionFactory.openSession();
4545
}
@@ -57,8 +57,7 @@ void closeSession() {
5757
* possible bij using an inline 'association' map.
5858
*/
5959
@Test
60-
void selectElementValueInContainerUsingInline()
61-
throws Exception {
60+
void selectElementValueInContainerUsingInline() throws Exception {
6261
openSession("inline");
6362

6463
Element myElement = sqlSession.getMapper(ElementMapperUsingInline.class).selectElement();
@@ -72,10 +71,10 @@ void selectElementValueInContainerUsingInline()
7271
*/
7372
@Test
7473
void selectElementValueInContainerUsingSubMap() throws Exception {
75-
openSession("submap");
74+
openSession("submap");
7675

77-
Element myElement = sqlSession.getMapper(ElementMapperUsingSubMap.class).selectElement();
76+
Element myElement = sqlSession.getMapper(ElementMapperUsingSubMap.class).selectElement();
7877

79-
assertEquals("value", myElement.getElement().getElement().getValue());
78+
assertEquals("value", myElement.getElement().getElement().getValue());
8079
}
8180
}

src/test/java/org/apache/ibatis/submitted/javassist/JavassistTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Copyright 2009-2019 the original author or authors.
2+
* Copyright 2009-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.
@@ -43,7 +43,7 @@ static void setUp() throws Exception {
4343

4444
// populate in-memory database
4545
BaseDataTest.runScript(sqlSessionFactory.getConfiguration().getEnvironment().getDataSource(),
46-
"org/apache/ibatis/submitted/javassist/CreateDB.sql");
46+
"org/apache/ibatis/submitted/javassist/CreateDB.sql");
4747
}
4848

4949
@Test

src/test/java/org/apache/ibatis/submitted/keycolumn/InsertMapper.java

Lines changed: 2 additions & 2 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-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.
@@ -28,5 +28,5 @@ public interface InsertMapper {
2828
@Options(keyProperty="id", useGeneratedKeys=true, keyColumn="name_id")
2929
int insertNameAnnotated(Name name);
3030

31-
int insertNameMapped(Name name);
31+
int insertNameMapped(Name name);
3232
}
Lines changed: 28 additions & 22 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-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.
@@ -16,25 +16,31 @@
1616
package org.apache.ibatis.submitted.keycolumn;
1717

1818
public class Name {
19-
private Integer id;
20-
private String firstName;
21-
private String lastName;
22-
public Integer getId() {
23-
return id;
24-
}
25-
public void setId(Integer id) {
26-
this.id = id;
27-
}
28-
public String getFirstName() {
29-
return firstName;
30-
}
31-
public void setFirstName(String firstName) {
32-
this.firstName = firstName;
33-
}
34-
public String getLastName() {
35-
return lastName;
36-
}
37-
public void setLastName(String lastName) {
38-
this.lastName = lastName;
39-
}
19+
private Integer id;
20+
private String firstName;
21+
private String lastName;
22+
23+
public Integer getId() {
24+
return id;
25+
}
26+
27+
public void setId(Integer id) {
28+
this.id = id;
29+
}
30+
31+
public String getFirstName() {
32+
return firstName;
33+
}
34+
35+
public void setFirstName(String firstName) {
36+
this.firstName = firstName;
37+
}
38+
39+
public String getLastName() {
40+
return lastName;
41+
}
42+
43+
public void setLastName(String lastName) {
44+
this.lastName = lastName;
45+
}
4046
}

0 commit comments

Comments
 (0)