-
Notifications
You must be signed in to change notification settings - Fork 32
Issue 1401: New diagnostics for PersistenceMapKeyDiagnostics #1405
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
venmanyarun
merged 15 commits into
OpenLiberty:lsp4jakarta-0.2.5-integration
from
Joseph-Bineesh:issue_1401
Oct 23, 2025
Merged
Changes from 13 commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
c1e417d
Introducing hasField to check the existence of PsiField
Joseph-Bineesh 3d4fc56
Accessor warning diagnostics for method and field
Joseph-Bineesh 4b0b578
Add diagnostics for type check
Joseph-Bineesh afb0298
Update copyright
Joseph-Bineesh e6f8890
Update PersistenceMapKeyDiagnosticsCollector.java
Joseph-Bineesh 8a93d9d
Testcases for following diagnostics:
Joseph-Bineesh 4f07974
Testcase input files
Joseph-Bineesh 4d0a727
Source code formatted
Joseph-Bineesh 70418dc
Change variable name to follow Oracle's guidelines
Joseph-Bineesh ddf5ea2
Refactor hasField method
Joseph-Bineesh 374c7a2
Removed lines
Joseph-Bineesh 27d4d5e
Using StringUtils utility
Joseph-Bineesh dd97ec6
Change from isEmpty to isNotBlank
Joseph-Bineesh 88adcc3
Copyright update
Joseph-Bineesh ebc2127
Merge branch 'lsp4jakarta-0.2.5' into issue_1401
Joseph-Bineesh File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
52 changes: 52 additions & 0 deletions
52
...ain/java/io/openliberty/sample/jakarta/persistence/MapKeyAnnotationsGetterConvention.java
This file contains hidden or 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,52 @@ | ||
| package io.openliberty.sample.jakarta.persistence; | ||
|
|
||
| import java.util.HashMap; | ||
| import java.util.Map; | ||
|
|
||
| import jakarta.persistence.MapKey; | ||
| import jakarta.persistence.MapKeyClass; | ||
|
|
||
| public class MapKeyAnnotationsGetterConvention { | ||
|
|
||
| Integer age; | ||
|
|
||
|
|
||
| String name; | ||
|
|
||
| Map<Integer, String> place; | ||
|
|
||
| Map<Integer, String> gender; | ||
|
|
||
| Map<Integer, String> testMap = new HashMap<>(); | ||
|
|
||
|
|
||
| @MapKeyClass(Map.class) | ||
| public Map<Integer, String> getTestMap() { | ||
| return this.testMap; | ||
| } | ||
|
|
||
|
|
||
| public Integer getAge() { | ||
| return this.age; | ||
| } | ||
|
|
||
| public String getName() { | ||
| return this.name; | ||
| } | ||
|
|
||
| @MapKeyClass(Map.class) | ||
| private Map<Integer, String> getPlace() { | ||
| return this.place; | ||
| } | ||
|
|
||
| @MapKey() | ||
| public Map<Integer, String> geGender() { | ||
| return null; | ||
| } | ||
|
|
||
| @MapKey() | ||
| public Map<Integer, String> getPerform() { | ||
| return null; | ||
| } | ||
|
|
||
| } |
40 changes: 40 additions & 0 deletions
40
...sample/src/main/java/io/openliberty/sample/jakarta/persistence/MapKeyAnnotationsType.java
This file contains hidden or 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,40 @@ | ||
| package io.openliberty.sample.jakarta.persistence; | ||
|
|
||
| import java.util.HashMap; | ||
| import java.util.Map; | ||
|
|
||
| import jakarta.persistence.MapKey; | ||
| import jakarta.persistence.MapKeyClass; | ||
|
|
||
| public class MapKeyAnnotationsType { | ||
|
|
||
| Integer age; | ||
|
|
||
| @MapKey() | ||
| String name; | ||
|
|
||
| Map<Integer, String> place; | ||
|
|
||
| Map<Integer, String> gender; | ||
|
|
||
| Map<Integer, String> testMap = new HashMap<>(); | ||
|
|
||
|
|
||
| public Map<Integer, String> getTestMap() { | ||
| return this.testMap; | ||
| } | ||
|
|
||
| @MapKey() | ||
| public Integer getAge() { | ||
| return this.age; | ||
| } | ||
|
|
||
| public String getName() { | ||
| return this.name; | ||
| } | ||
|
|
||
| private Map<Integer, String> getPlace() { | ||
| return this.place; | ||
| } | ||
|
|
||
| } |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.