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 2525import java .io .FileWriter ;
2626import java .io .IOException ;
2727import java .nio .charset .StandardCharsets ;
28+ import java .nio .file .Files ;
2829
2930import org .junit .jupiter .api .AfterEach ;
3031import org .junit .jupiter .api .BeforeEach ;
@@ -42,10 +43,10 @@ class ExternalResourcesTest {
4243 */
4344 @ BeforeEach
4445 void setUp () throws Exception {
45- tempFile = File .createTempFile ("migration" , "properties" );
46+ tempFile = Files .createTempFile ("migration" , "properties" ). toFile ( );
4647 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 ( );
4950 }
5051
5152 @ Test
Original file line number Diff line number Diff line change 11/*
2- * Copyright 2009-2023 the original author or authors.
2+ * Copyright 2009-2024 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.
@@ -21,7 +21,7 @@ public class Item {
2121
2222 @ Override
2323 public String toString () {
24- return new StringBuilder (). append ( "Item(" ). append ( id ). append ( ", " ). append ( name ). append ( " )" ). toString () ;
24+ return "Item(" + id + ", " + name + " )" ;
2525 }
2626
2727 public Integer getId () {
Original file line number Diff line number Diff line change 11/*
2- * Copyright 2009-2023 the original author or authors.
2+ * Copyright 2009-2024 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.
@@ -26,8 +26,7 @@ public class Person {
2626
2727 @ Override
2828 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 + " )" ;
3130 }
3231
3332 public Integer getId () {
Original file line number Diff line number Diff line change 11/*
2- * Copyright 2009-2023 the original author or authors.
2+ * Copyright 2009-2024 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.
@@ -24,8 +24,7 @@ public class PersonItemPair {
2424
2525 @ Override
2626 public String toString () {
27- return new StringBuilder ().append ("PersonItemPair(" ).append (person ).append (", " ).append (item ).append (" )" )
28- .toString ();
27+ return "PersonItemPair(" + person + ", " + item + " )" ;
2928 }
3029
3130 public Person getPerson () {
You can’t perform that action at this time.
0 commit comments