Skip to content

Commit 0313517

Browse files
committed
Expect serialVersionUID field now added to Serializable
1 parent 0af9942 commit 0313517

File tree

1 file changed

+19
-8
lines changed

1 file changed

+19
-8
lines changed

src/testWithSpringBoot_2_7/java/org/openrewrite/java/spring/boot2/Boot3UpgradeTest.java

+19-8
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,15 @@ public void defaults(RecipeSpec spec) {
3232
spec
3333
.recipeFromResources("org.openrewrite.java.spring.boot3.UpgradeSpringBoot_3_0")
3434
.parser(JavaParser.fromJavaVersion()
35-
.classpath("spring-context", "spring-data-jpa", "spring-web",
36-
"spring-boot", "spring-core", "persistence-api", "validation-api", "xml.bind-api"));
35+
.classpath(
36+
"spring-context",
37+
"spring-data-jpa",
38+
"spring-web",
39+
"spring-boot",
40+
"spring-core",
41+
"persistence-api",
42+
"validation-api",
43+
"xml.bind-api"));
3744
}
3845

3946
@DocumentExample
@@ -50,18 +57,18 @@ void xmlBindMissing() {
5057
<groupId>org.springframework.samples</groupId>
5158
<artifactId>spring-petclinic</artifactId>
5259
<version>2.7.3</version>
53-
60+
5461
<parent>
5562
<groupId>org.springframework.boot</groupId>
5663
<artifactId>spring-boot-starter-parent</artifactId>
5764
<version>2.7.3</version>
5865
</parent>
5966
<name>petclinic</name>
60-
67+
6168
<properties>
6269
<java.version>1.8</java.version>
6370
</properties>
64-
71+
6572
<dependencies>
6673
<dependency>
6774
<groupId>org.springframework.boot</groupId>
@@ -84,18 +91,18 @@ void xmlBindMissing() {
8491
<groupId>org.springframework.samples</groupId>
8592
<artifactId>spring-petclinic</artifactId>
8693
<version>2.7.3</version>
87-
94+
8895
<parent>
8996
<groupId>org.springframework.boot</groupId>
9097
<artifactId>spring-boot-starter-parent</artifactId>
9198
<version>3.0.13</version>
9299
</parent>
93100
<name>petclinic</name>
94-
101+
95102
<properties>
96103
<java.version>17</java.version>
97104
</properties>
98-
105+
99106
<dependencies>
100107
<dependency>
101108
<groupId>jakarta.xml.bind</groupId>
@@ -184,6 +191,8 @@ public void setName(String name) {
184191
@Table(name = "specialties")
185192
public class Specialty implements Serializable {
186193
194+
private static final long serialVersionUID = 1;
195+
187196
@Id
188197
@GeneratedValue(strategy = GenerationType.IDENTITY)
189198
private Integer id;
@@ -353,6 +362,8 @@ public void setLastName(String lastName) {
353362
@Table(name = "vets")
354363
public class Vet implements Serializable {
355364
365+
private static final long serialVersionUID = 1;
366+
356367
@Id
357368
@GeneratedValue(strategy = GenerationType.IDENTITY)
358369
private Integer id;

0 commit comments

Comments
 (0)