-
Couldn't load subscription status.
- Fork 31
Added automation test to ensure no diagnostics shown for incorrect import or annotation similar to exact one corresponding to AnnotationDiagnosticsCollector #1085
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
Draft
dessina-devasia
wants to merge
11
commits into
OpenLiberty:main
Choose a base branch
from
dessina-devasia:add-non-matching-test-annotation-diagnostics
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
22b1e10
Modification to ensure no diagnostics are generated for any incorrect…
dessina-devasia 7d1c121
Merge pull request #2 from dessina-devasia/add-non-matching-annotatio…
dessina-devasia a440f23
Modification to ensure no incorrect import or annotation in Generated…
dessina-devasia 1fe752c
Merge pull request #3 from dessina-devasia/add-non-matching-test-gene…
dessina-devasia f31460f
Modification to ensure no incorrect import or annotation in Resource …
dessina-devasia 86063a1
Merge pull request #4 from dessina-devasia/add-non-matching-test-reso…
dessina-devasia 0e5ebd9
Resolved incorrect import in test class
dessina-devasia 1ae830c
Modification to ensure no incorrect import or annotation in PreDestro…
dessina-devasia 8941fd8
Merge pull request #5 from dessina-devasia/add-non-matching-test-pred…
dessina-devasia 0a35dbf
Modification in Incorrect Resource Annotation test
dessina-devasia 984848d
Resolved an error in GeneratedAnnotation related test class
dessina-devasia 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
14 changes: 14 additions & 0 deletions
14
...src/main/java/io/openliberty/sample/jakarta/annotations/IncorrectGeneratedAnnotation.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,14 @@ | ||
| package io.openliberty.sample.jakarta.annotations; | ||
|
|
||
| import random.test.pkg.on.Generated; | ||
|
|
||
| @Generated() | ||
| public class IncorrectGeneratedAnnotation { | ||
|
|
||
| @Generated() | ||
| private Integer studentId; | ||
|
|
||
| @random.test.pkg.on.Generated() | ||
| private boolean isHappy; | ||
|
|
||
| } |
19 changes: 19 additions & 0 deletions
19
...main/java/io/openliberty/sample/jakarta/annotations/IncorrectPostConstructAnnotation.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,19 @@ | ||
| package io.openliberty.sample.jakarta.annotations; | ||
|
|
||
| import jakarta.annotation.Resource; | ||
| import random.test.pkg.on.PostConstruct; | ||
|
|
||
| @Resource(type = Object.class, name = "aa") | ||
| public class IncorrectPostConstructAnnotation { | ||
|
|
||
| @PostConstruct | ||
| public void getHappinessRandom(String type) { | ||
|
|
||
| } | ||
|
|
||
| @random.test.pkg.on.PostConstruct | ||
| public void getRandom(String type) { | ||
|
|
||
| } | ||
|
|
||
| } | ||
28 changes: 28 additions & 0 deletions
28
...rc/main/java/io/openliberty/sample/jakarta/annotations/IncorrectPreDestroyAnnotation.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,28 @@ | ||
| package io.openliberty.sample.jakarta.annotations; | ||
|
|
||
| import random.test.pkg.on.PreDestroy; | ||
| import jakarta.annotation.Resource; | ||
|
|
||
| @Resource(type = Object.class, name = "aa") | ||
| public class IncorrectPreDestroyAnnotation { | ||
|
|
||
| private Integer studentId; | ||
|
|
||
| private boolean isHappy; | ||
|
|
||
| private boolean isSad; | ||
|
|
||
| @PreDestroy() | ||
| public Integer getStudentId() { | ||
| return this.studentId; | ||
| } | ||
|
|
||
| @random.test.pkg.on.PreDestroy() | ||
| public boolean getHappiness(String type) { | ||
| if (type.equals("happy")) return this.isHappy; | ||
| return this.isSad; | ||
| } | ||
| } | ||
|
|
||
|
|
||
|
|
17 changes: 17 additions & 0 deletions
17
.../src/main/java/io/openliberty/sample/jakarta/annotations/IncorrectResourceAnnotation.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,17 @@ | ||
| package io.openliberty.sample.jakarta.annotations; | ||
|
|
||
| import random.test.pkg.on.Resource; | ||
|
|
||
| public class IncorrectResourceAnnotation { | ||
|
|
||
| private Integer studentId; | ||
|
|
||
| @Resource | ||
| private boolean isSad; | ||
|
|
||
| @random.test.pkg.on.Resource | ||
| private boolean isHappy; | ||
|
|
||
| private String emailAddress; | ||
|
|
||
| } |
4 changes: 4 additions & 0 deletions
4
...t/resources/projects/maven/jakarta-sample/src/main/java/random/test/pkg/on/Generated.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,4 @@ | ||
| package random.test.pkg.on; | ||
|
|
||
| public @interface Generated { | ||
| } |
4 changes: 4 additions & 0 deletions
4
...sources/projects/maven/jakarta-sample/src/main/java/random/test/pkg/on/PostConstruct.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,4 @@ | ||
| package random.test.pkg.on; | ||
|
|
||
| public @interface PostConstruct { | ||
| } |
4 changes: 4 additions & 0 deletions
4
.../resources/projects/maven/jakarta-sample/src/main/java/random/test/pkg/on/PreDestroy.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,4 @@ | ||
| package random.test.pkg.on; | ||
|
|
||
| public @interface PreDestroy { | ||
| } |
4 changes: 4 additions & 0 deletions
4
...st/resources/projects/maven/jakarta-sample/src/main/java/random/test/pkg/on/Resource.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,4 @@ | ||
| package random.test.pkg.on; | ||
|
|
||
| public @interface Resource { | ||
| } |
Oops, something went wrong.
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.