-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add test for nonnull and nullable hierarchy
Fixes: #2833
- Loading branch information
Showing
4 changed files
with
97 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
.../com/vaadin/hilla/parser/plugins/nonnull/nullable/nonNullApi/NullableNonNullEndpoint.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package com.vaadin.hilla.parser.plugins.nonnull.nullable.nonNullApi; | ||
|
||
import com.vaadin.hilla.parser.plugins.nonnull.nullable.Endpoint; | ||
import jakarta.annotation.Nonnull; | ||
import jakarta.persistence.Id; | ||
import jakarta.persistence.Version; | ||
|
||
@Endpoint | ||
public class NullableNonNullEndpoint { | ||
|
||
public NullableNonNullFieldModel nullableNonNullFieldModel(NullableNonNullFieldModel nullableNonNullFieldModel) { | ||
return nullableNonNullFieldModel; | ||
} | ||
|
||
public static class NullableNonNullFieldModel { | ||
public String required; | ||
@Id | ||
public String id; | ||
@Version | ||
public Long version; | ||
@Version | ||
@Nonnull | ||
public Long notNullVersion; | ||
} | ||
} |
4 changes: 4 additions & 0 deletions
4
...c/test/java/com/vaadin/hilla/parser/plugins/nonnull/nullable/nonNullApi/package-info.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
@NonNullApi | ||
package com.vaadin.hilla.parser.plugins.nonnull.nullable.nonNullApi; | ||
|
||
import org.springframework.lang.NonNullApi; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters