Skip to content

Commit 1b7d0b5

Browse files
HyunSangHanmhalbritter
authored andcommitted
Replace deprecated @TeMPOraL with LocalDate
See gh-47015 Signed-off-by: Hyunsang Han <[email protected]>
1 parent d185b31 commit 1b7d0b5

File tree

2 files changed

+9
-10
lines changed

2 files changed

+9
-10
lines changed

smoke-test/spring-boot-smoke-test-data-jpa/src/main/java/smoketest/data/jpa/domain/Review.java

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
package smoketest.data.jpa.domain;
1818

1919
import java.io.Serializable;
20-
import java.util.Date;
20+
import java.time.LocalDate;
2121

2222
import jakarta.persistence.Column;
2323
import jakarta.persistence.Entity;
@@ -55,9 +55,8 @@ public class Review implements Serializable {
5555
private Rating rating;
5656

5757
@Column(nullable = false)
58-
@jakarta.persistence.Temporal(jakarta.persistence.TemporalType.DATE)
59-
@SuppressWarnings({ "deprecation", "NullAway.Init" })
60-
private Date checkInDate;
58+
@SuppressWarnings("NullAway.Init")
59+
private LocalDate checkInDate;
6160

6261
@Column(nullable = false)
6362
@Enumerated(EnumType.ORDINAL)
@@ -103,11 +102,11 @@ public void setRating(Rating rating) {
103102
this.rating = rating;
104103
}
105104

106-
public Date getCheckInDate() {
105+
public LocalDate getCheckInDate() {
107106
return this.checkInDate;
108107
}
109108

110-
public void setCheckInDate(Date checkInDate) {
109+
public void setCheckInDate(LocalDate checkInDate) {
111110
this.checkInDate = checkInDate;
112111
}
113112

smoke-test/spring-boot-smoke-test-data-jpa/src/main/java/smoketest/data/jpa/domain/ReviewDetails.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,23 +17,23 @@
1717
package smoketest.data.jpa.domain;
1818

1919
import java.io.Serializable;
20-
import java.util.Date;
20+
import java.time.LocalDate;
2121

2222
public class ReviewDetails implements Serializable {
2323

2424
private static final long serialVersionUID = 1L;
2525

2626
private final Rating rating;
2727

28-
private final Date checkInDate;
28+
private final LocalDate checkInDate;
2929

3030
private final TripType tripType;
3131

3232
private final String title;
3333

3434
private final String details;
3535

36-
public ReviewDetails(Rating rating, Date checkInDate, TripType tripType, String title, String details) {
36+
public ReviewDetails(Rating rating, LocalDate checkInDate, TripType tripType, String title, String details) {
3737
this.rating = rating;
3838
this.checkInDate = checkInDate;
3939
this.tripType = tripType;
@@ -45,7 +45,7 @@ public Rating getRating() {
4545
return this.rating;
4646
}
4747

48-
public Date getCheckInDate() {
48+
public LocalDate getCheckInDate() {
4949
return this.checkInDate;
5050
}
5151

0 commit comments

Comments
 (0)