Add nullability annotations to smoke-test/spring-boot-smoke-test-data-jdbc
See gh-46587
This commit is contained in:
parent
f958a60674
commit
f8fa900976
|
|
@ -18,38 +18,40 @@ package smoketest.data.jdbc;
|
|||
|
||||
import java.time.LocalDate;
|
||||
|
||||
import org.jspecify.annotations.Nullable;
|
||||
|
||||
import org.springframework.data.annotation.Id;
|
||||
|
||||
public class Customer {
|
||||
|
||||
@Id
|
||||
private Long id;
|
||||
private @Nullable Long id;
|
||||
|
||||
private String firstName;
|
||||
private @Nullable String firstName;
|
||||
|
||||
private LocalDate dateOfBirth;
|
||||
private @Nullable LocalDate dateOfBirth;
|
||||
|
||||
public Long getId() {
|
||||
public @Nullable Long getId() {
|
||||
return this.id;
|
||||
}
|
||||
|
||||
public void setId(Long id) {
|
||||
public void setId(@Nullable Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getFirstName() {
|
||||
public @Nullable String getFirstName() {
|
||||
return this.firstName;
|
||||
}
|
||||
|
||||
public void setFirstName(String firstName) {
|
||||
public void setFirstName(@Nullable String firstName) {
|
||||
this.firstName = firstName;
|
||||
}
|
||||
|
||||
public LocalDate getDateOfBirth() {
|
||||
public @Nullable LocalDate getDateOfBirth() {
|
||||
return this.dateOfBirth;
|
||||
}
|
||||
|
||||
public void setDateOfBirth(LocalDate dateOfBirth) {
|
||||
public void setDateOfBirth(@Nullable LocalDate dateOfBirth) {
|
||||
this.dateOfBirth = dateOfBirth;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,20 @@
|
|||
/*
|
||||
* Copyright 2012-present the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* https://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
@NullMarked
|
||||
package smoketest.data.jdbc;
|
||||
|
||||
import org.jspecify.annotations.NullMarked;
|
||||
Loading…
Reference in New Issue