summaryrefslogtreecommitdiff
path: root/container-compiler-plugin/src/test/java/io/trygvis/persistence/EntityMirrorTest.java
diff options
context:
space:
mode:
Diffstat (limited to 'container-compiler-plugin/src/test/java/io/trygvis/persistence/EntityMirrorTest.java')
-rw-r--r--container-compiler-plugin/src/test/java/io/trygvis/persistence/EntityMirrorTest.java14
1 files changed, 7 insertions, 7 deletions
diff --git a/container-compiler-plugin/src/test/java/io/trygvis/persistence/EntityMirrorTest.java b/container-compiler-plugin/src/test/java/io/trygvis/persistence/EntityMirrorTest.java
index dc69a03..fc63a8a 100644
--- a/container-compiler-plugin/src/test/java/io/trygvis/persistence/EntityMirrorTest.java
+++ b/container-compiler-plugin/src/test/java/io/trygvis/persistence/EntityMirrorTest.java
@@ -95,7 +95,7 @@ public class EntityMirrorTest {
public static Object[][] insertIntoMethodProvider() {
return new Object[][]{
new Object[]{new FieldMirror[]{name}, join(
- "try(java.sql.PreparedStatement stmt = con.prepareStatement(insertIntoSql)) {",
+ "try (java.sql.PreparedStatement stmt = con.prepareStatement(insertIntoSql)) {",
" java.lang.String name = o.name;",
" if (name == null) {",
" stmt.setNull(1, java.sql.Types.VARCHAR);",
@@ -106,13 +106,13 @@ public class EntityMirrorTest {
"}")
},
new Object[]{new FieldMirror[]{year}, join(
- "try(java.sql.PreparedStatement stmt = con.prepareStatement(insertIntoSql)) {",
+ "try (java.sql.PreparedStatement stmt = con.prepareStatement(insertIntoSql)) {",
" stmt.setInt(1, o.getYear());",
" stmt.executeUpdate();",
"}")
},
new Object[]{new FieldMirror[]{age, year, idLong}, join(
- "try(java.sql.PreparedStatement stmt = con.prepareStatement(insertIntoSql)) {",
+ "try (java.sql.PreparedStatement stmt = con.prepareStatement(insertIntoSql)) {",
" stmt.setInt(1, o.age);",
" stmt.setInt(2, o.getYear());",
" stmt.executeUpdate();",
@@ -137,10 +137,10 @@ public class EntityMirrorTest {
public static Object[][] deleteMethodProvider() {
return new Object[][]{
new Object[]{new FieldMirror[]{idLong}, join(
- "deleteById(con, o.id);")
+ "deleteWatById(con, o.id);")
},
new Object[]{new FieldMirror[]{idMethod}, join(
- "deleteById(con, o.getId());")
+ "deleteWatById(con, o.getId());")
},
};
}
@@ -161,13 +161,13 @@ public class EntityMirrorTest {
public static Object[][] deleteByIdMethodProvider() {
return new Object[][]{
new Object[]{new FieldMirror[]{idLong}, join(
- "try(java.sql.PreparedStatement stmt = con.prepareStatement(deleteFromSql)) {",
+ "try (java.sql.PreparedStatement stmt = con.prepareStatement(deleteFromSql)) {",
" stmt.setLong(1, id);",
" stmt.executeUpdate();",
"}")
},
new Object[]{new FieldMirror[]{idMethod}, join(
- "try(java.sql.PreparedStatement stmt = con.prepareStatement(deleteFromSql)) {",
+ "try (java.sql.PreparedStatement stmt = con.prepareStatement(deleteFromSql)) {",
" stmt.setLong(1, id);",
" stmt.executeUpdate();",
"}")