File tree Expand file tree Collapse file tree 4 files changed +10
-11
lines changed
src/test/java/org/apache/ibatis
submitted/nestedresulthandler Expand file tree Collapse file tree 4 files changed +10
-11
lines changed Original file line number Diff line number Diff line change 25
25
import java .io .FileWriter ;
26
26
import java .io .IOException ;
27
27
import java .nio .charset .StandardCharsets ;
28
+ import java .nio .file .Files ;
28
29
29
30
import org .junit .jupiter .api .AfterEach ;
30
31
import org .junit .jupiter .api .BeforeEach ;
@@ -42,10 +43,10 @@ class ExternalResourcesTest {
42
43
*/
43
44
@ BeforeEach
44
45
void setUp () throws Exception {
45
- tempFile = File .createTempFile ("migration" , "properties" );
46
+ tempFile = Files .createTempFile ("migration" , "properties" ). toFile ( );
46
47
tempFile .canWrite ();
47
- sourceFile = File .createTempFile ("test1" , "sql" );
48
- destFile = File .createTempFile ("test2" , "sql" );
48
+ sourceFile = Files .createTempFile ("test1" , "sql" ). toFile ( );
49
+ destFile = Files .createTempFile ("test2" , "sql" ). toFile ( );
49
50
}
50
51
51
52
@ Test
Original file line number Diff line number Diff line change 1
1
/*
2
- * Copyright 2009-2023 the original author or authors.
2
+ * Copyright 2009-2024 the original author or authors.
3
3
*
4
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
5
* you may not use this file except in compliance with the License.
@@ -21,7 +21,7 @@ public class Item {
21
21
22
22
@ Override
23
23
public String toString () {
24
- return new StringBuilder (). append ( "Item(" ). append ( id ). append ( ", " ). append ( name ). append ( " )" ). toString () ;
24
+ return "Item(" + id + ", " + name + " )" ;
25
25
}
26
26
27
27
public Integer getId () {
Original file line number Diff line number Diff line change 1
1
/*
2
- * Copyright 2009-2023 the original author or authors.
2
+ * Copyright 2009-2024 the original author or authors.
3
3
*
4
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
5
* you may not use this file except in compliance with the License.
@@ -26,8 +26,7 @@ public class Person {
26
26
27
27
@ Override
28
28
public String toString () {
29
- return new StringBuilder ().append ("Person(" ).append (id ).append (", " ).append (name ).append (", " ).append (items )
30
- .append (" )" ).toString ();
29
+ return "Person(" + id + ", " + name + ", " + items + " )" ;
31
30
}
32
31
33
32
public Integer getId () {
Original file line number Diff line number Diff line change 1
1
/*
2
- * Copyright 2009-2023 the original author or authors.
2
+ * Copyright 2009-2024 the original author or authors.
3
3
*
4
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
5
* you may not use this file except in compliance with the License.
@@ -24,8 +24,7 @@ public class PersonItemPair {
24
24
25
25
@ Override
26
26
public String toString () {
27
- return new StringBuilder ().append ("PersonItemPair(" ).append (person ).append (", " ).append (item ).append (" )" )
28
- .toString ();
27
+ return "PersonItemPair(" + person + ", " + item + " )" ;
29
28
}
30
29
31
30
public Person getPerson () {
You can’t perform that action at this time.
0 commit comments