mirror of
https://github.com/spring-projects/spring-boot.git
synced 2026-09-17 20:19:06 +00:00
Merge pull request #47015 from HyunSangHan
* pr/47015: Replace deprecated @Temporal with LocalDate Closes gh-47015
This commit is contained in:
+5
-6
@@ -17,7 +17,7 @@
|
||||
package smoketest.data.jpa.domain;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import java.time.LocalDate;
|
||||
|
||||
import jakarta.persistence.Column;
|
||||
import jakarta.persistence.Entity;
|
||||
@@ -55,9 +55,8 @@ public class Review implements Serializable {
|
||||
private Rating rating;
|
||||
|
||||
@Column(nullable = false)
|
||||
@jakarta.persistence.Temporal(jakarta.persistence.TemporalType.DATE)
|
||||
@SuppressWarnings({ "deprecation", "NullAway.Init" })
|
||||
private Date checkInDate;
|
||||
@SuppressWarnings("NullAway.Init")
|
||||
private LocalDate checkInDate;
|
||||
|
||||
@Column(nullable = false)
|
||||
@Enumerated(EnumType.ORDINAL)
|
||||
@@ -103,11 +102,11 @@ public class Review implements Serializable {
|
||||
this.rating = rating;
|
||||
}
|
||||
|
||||
public Date getCheckInDate() {
|
||||
public LocalDate getCheckInDate() {
|
||||
return this.checkInDate;
|
||||
}
|
||||
|
||||
public void setCheckInDate(Date checkInDate) {
|
||||
public void setCheckInDate(LocalDate checkInDate) {
|
||||
this.checkInDate = checkInDate;
|
||||
}
|
||||
|
||||
|
||||
+4
-4
@@ -17,7 +17,7 @@
|
||||
package smoketest.data.jpa.domain;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import java.time.LocalDate;
|
||||
|
||||
public class ReviewDetails implements Serializable {
|
||||
|
||||
@@ -25,7 +25,7 @@ public class ReviewDetails implements Serializable {
|
||||
|
||||
private final Rating rating;
|
||||
|
||||
private final Date checkInDate;
|
||||
private final LocalDate checkInDate;
|
||||
|
||||
private final TripType tripType;
|
||||
|
||||
@@ -33,7 +33,7 @@ public class ReviewDetails implements Serializable {
|
||||
|
||||
private final String details;
|
||||
|
||||
public ReviewDetails(Rating rating, Date checkInDate, TripType tripType, String title, String details) {
|
||||
public ReviewDetails(Rating rating, LocalDate checkInDate, TripType tripType, String title, String details) {
|
||||
this.rating = rating;
|
||||
this.checkInDate = checkInDate;
|
||||
this.tripType = tripType;
|
||||
@@ -45,7 +45,7 @@ public class ReviewDetails implements Serializable {
|
||||
return this.rating;
|
||||
}
|
||||
|
||||
public Date getCheckInDate() {
|
||||
public LocalDate getCheckInDate() {
|
||||
return this.checkInDate;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user