Skip to content
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

#2838 standardize nullability annotations #3084

Closed
Show file tree
Hide file tree
Changes from 138 commits
Commits
Show all changes
141 commits
Select commit Hold shift + click to select a range
36452c5
#2838 added basic structure for a recipe for standardizing nullabilit…
AlexanderSkrock Mar 29, 2023
15c9393
#2838 added dummy testcases to cover most replacement scenarios
AlexanderSkrock Mar 29, 2023
6c21242
#2838 added yaml definition for nullability recipes
AlexanderSkrock Mar 30, 2023
47c0107
#2838 added dummy test cases to cover javax yaml recipe
AlexanderSkrock Mar 30, 2023
15f3012
#2838 added known nullability annotations
AlexanderSkrock Mar 30, 2023
0c60641
#2838 refactored set initialization using stream api
AlexanderSkrock Mar 30, 2023
8c0b2a6
#2838 implemented unit tests for standardizing nullable annotations
AlexanderSkrock Mar 30, 2023
5fa8b7d
#2838 splitted pre configured recipes into gradle and maven
AlexanderSkrock Mar 31, 2023
8c74a6e
#2838 fixed license header
AlexanderSkrock Apr 4, 2023
410b10b
#2838 removed dependency management specific recipes
AlexanderSkrock Apr 6, 2023
6f91c60
#2838 removed redundant non null api annotation
AlexanderSkrock Apr 6, 2023
1a5eb00
#2838 enhanced recipe to replace context sensitive
AlexanderSkrock Apr 8, 2023
d0e5d15
#2838 added api to add annotations on package-level
AlexanderSkrock Apr 8, 2023
8761856
#2838 adapted test cases according to recipe changes
AlexanderSkrock Apr 8, 2023
416dece
#2838 added annotations for implicit overrides
AlexanderSkrock Apr 8, 2023
cc2c0c9
#2838 integrated standardization visitor into the recipe
AlexanderSkrock Apr 8, 2023
dfb49eb
#2838 reworked test cases based on new implementation details
AlexanderSkrock Apr 8, 2023
8a60fe8
#2838 added todo on finishing the database of known nullability annot…
AlexanderSkrock Apr 8, 2023
a8e67c5
#2838 added todos on import management
AlexanderSkrock Apr 8, 2023
b752869
#2838 fixed license header
AlexanderSkrock Apr 9, 2023
33c8b35
#2838 use string literal for javax annotations to keep dependency on …
AlexanderSkrock Apr 9, 2023
8e6ec00
#2838 implement missing test cases
AlexanderSkrock Apr 9, 2023
8715deb
#2838 fixed javax non null scopes
AlexanderSkrock Apr 9, 2023
23eb5df
#2838 use annotations by their simple name
AlexanderSkrock Apr 10, 2023
1135120
#2838 do replacement nullability sensitive
AlexanderSkrock Apr 10, 2023
38e4cb9
#2838 use own type for scopes
AlexanderSkrock Apr 11, 2023
732d722
#2838 added import handling
AlexanderSkrock Apr 11, 2023
da3319b
#2838 fixed scopes for javax nullable annotation
AlexanderSkrock Apr 11, 2023
db4a1c6
#2838 fixed java code formatting in test cases
AlexanderSkrock Apr 11, 2023
bb74d40
#2838 force adding imports
AlexanderSkrock Apr 11, 2023
4f19463
#2838 added package info for the new package
AlexanderSkrock Apr 11, 2023
044932a
#2838 added todo to possibly remove the workaround
AlexanderSkrock Apr 11, 2023
74972b8
#2838 replaced javax dependency with jsr305 which contains the Nonnul…
AlexanderSkrock Apr 13, 2023
0bf49a8
#2838 added dependency for androidx annotations
AlexanderSkrock Apr 13, 2023
edd37ed
#2838 use spring annotations for testcases
AlexanderSkrock Apr 13, 2023
9d60341
#2838 added targets and scopes for spring annotations
AlexanderSkrock Apr 13, 2023
7f68e29
#2838 implemented annotation templates for packages
AlexanderSkrock Apr 13, 2023
655f4ae
#2838 added handling for empty packages
AlexanderSkrock Apr 13, 2023
6db2ae3
#2838 explicitly skip changing when we would reinsert the same annota…
AlexanderSkrock Apr 13, 2023
c9bded1
#2838 added templating functionality to add annotations to annotated …
AlexanderSkrock Apr 13, 2023
b5c7205
#2838 added replacement of annotated types
AlexanderSkrock Apr 13, 2023
e5d71ac
#2838 auto format changes
AlexanderSkrock Apr 13, 2023
9ffa149
#2838 fix adding annotation on packages
AlexanderSkrock Apr 13, 2023
85f6de5
#2838 removed todo after checking imports
AlexanderSkrock Apr 13, 2023
f478d4f
#2838 fix javadoc
AlexanderSkrock Apr 14, 2023
b0b74b9
#2838 using runtime dependencies for template parsing
AlexanderSkrock Apr 14, 2023
b65eed4
Merge branch '#2838-standardize-nullability-annotations' of github.co…
AlexanderSkrock Apr 14, 2023
5a443a5
#2838 removed force adding imports
AlexanderSkrock Apr 14, 2023
2b5aaaa
#2838 use type prefix on first annotation to maintain spacing
AlexanderSkrock Apr 14, 2023
8404766
#2838 use prefix from first annotation or type expression
AlexanderSkrock Apr 14, 2023
08478cf
#2838 remove first and last utility methods
AlexanderSkrock Apr 14, 2023
387416d
#2838 removed call to apache commons lang
AlexanderSkrock Apr 14, 2023
2100d87
#2838 reworked description for "additionalNullabilityAnnotations" option
AlexanderSkrock Apr 14, 2023
ed972b8
#2838 first effort on filling the list of known annotations
AlexanderSkrock Apr 14, 2023
c079230
#2838 adding some more nullability annotations
AlexanderSkrock Apr 14, 2023
63b331d
#2838 added pre configured recipes
AlexanderSkrock Apr 14, 2023
a350e87
#2838 added some test cases for preconfigured recipes
AlexanderSkrock Apr 14, 2023
94efac5
Merge branch 'openrewrite:main' into #2838-standardize-nullability-an…
AlexanderSkrock Apr 17, 2023
0ce32ef
#2838 integrated ShortenFullyQualifiedTypeReferences recipe
AlexanderSkrock Apr 17, 2023
dd6c5b6
#2838 added testcase for adding annotation using its fqn in edge cases
AlexanderSkrock Apr 17, 2023
e2ce72e
#2838 fixed testcase regarding using fqn in edge cases
AlexanderSkrock Apr 17, 2023
06fe17b
#2838 added todos regarding target types
AlexanderSkrock Apr 17, 2023
71b96b5
#2838 fixed licensing headers
AlexanderSkrock Apr 17, 2023
0d04a69
#2838 fixed test cases
AlexanderSkrock Apr 17, 2023
87a002f
#2838 finalizing target type recognition
AlexanderSkrock Apr 18, 2023
6dcc48e
#2838 remove logger
AlexanderSkrock Apr 18, 2023
9fdfafe
Rename to "open rewrite" to comply with the naming convention
AlexanderSkrock Apr 19, 2023
a21ab9b
Remove unnecessary function wrapper
AlexanderSkrock Apr 19, 2023
ab4f6ac
Use Optional#get as we already checked an element is present
AlexanderSkrock Apr 19, 2023
3b04b48
#2838 added basic structure for a recipe for standardizing nullabilit…
AlexanderSkrock Mar 29, 2023
32bbfe2
#2838 added dummy testcases to cover most replacement scenarios
AlexanderSkrock Mar 29, 2023
d4e71bd
#2838 added yaml definition for nullability recipes
AlexanderSkrock Mar 30, 2023
9de0dce
#2838 added dummy test cases to cover javax yaml recipe
AlexanderSkrock Mar 30, 2023
e2c74cf
#2838 added known nullability annotations
AlexanderSkrock Mar 30, 2023
387b375
#2838 refactored set initialization using stream api
AlexanderSkrock Mar 30, 2023
79beed9
#2838 implemented unit tests for standardizing nullable annotations
AlexanderSkrock Mar 30, 2023
e457832
#2838 splitted pre configured recipes into gradle and maven
AlexanderSkrock Mar 31, 2023
0de7baa
#2838 fixed license header
AlexanderSkrock Apr 4, 2023
99f1832
#2838 removed dependency management specific recipes
AlexanderSkrock Apr 6, 2023
8c552d6
#2838 removed redundant non null api annotation
AlexanderSkrock Apr 6, 2023
22255d3
#2838 enhanced recipe to replace context sensitive
AlexanderSkrock Apr 8, 2023
4f5f62a
#2838 added api to add annotations on package-level
AlexanderSkrock Apr 8, 2023
d831b3a
#2838 adapted test cases according to recipe changes
AlexanderSkrock Apr 8, 2023
baf0493
#2838 added annotations for implicit overrides
AlexanderSkrock Apr 8, 2023
d658dd4
#2838 integrated standardization visitor into the recipe
AlexanderSkrock Apr 8, 2023
21fb960
#2838 reworked test cases based on new implementation details
AlexanderSkrock Apr 8, 2023
193e623
#2838 added todo on finishing the database of known nullability annot…
AlexanderSkrock Apr 8, 2023
fffabf5
#2838 added todos on import management
AlexanderSkrock Apr 8, 2023
1230673
#2838 fixed license header
AlexanderSkrock Apr 9, 2023
5c95052
#2838 use string literal for javax annotations to keep dependency on …
AlexanderSkrock Apr 9, 2023
2e180aa
#2838 implement missing test cases
AlexanderSkrock Apr 9, 2023
288656f
#2838 fixed javax non null scopes
AlexanderSkrock Apr 9, 2023
559f7f9
#2838 use annotations by their simple name
AlexanderSkrock Apr 10, 2023
f9ba01f
#2838 do replacement nullability sensitive
AlexanderSkrock Apr 10, 2023
3afce2e
#2838 use own type for scopes
AlexanderSkrock Apr 11, 2023
e8d08d5
#2838 added import handling
AlexanderSkrock Apr 11, 2023
d987ef9
#2838 fixed scopes for javax nullable annotation
AlexanderSkrock Apr 11, 2023
75d0b02
#2838 fixed java code formatting in test cases
AlexanderSkrock Apr 11, 2023
7193cf0
#2838 force adding imports
AlexanderSkrock Apr 11, 2023
99e839e
#2838 added package info for the new package
AlexanderSkrock Apr 11, 2023
2d54ab4
#2838 added todo to possibly remove the workaround
AlexanderSkrock Apr 11, 2023
67f1988
#2838 replaced javax dependency with jsr305 which contains the Nonnul…
AlexanderSkrock Apr 13, 2023
a0c47ab
#2838 added dependency for androidx annotations
AlexanderSkrock Apr 13, 2023
6d4805e
#2838 use spring annotations for testcases
AlexanderSkrock Apr 13, 2023
e236c81
#2838 added targets and scopes for spring annotations
AlexanderSkrock Apr 13, 2023
afaf93a
#2838 implemented annotation templates for packages
AlexanderSkrock Apr 13, 2023
9eba15f
#2838 added handling for empty packages
AlexanderSkrock Apr 13, 2023
03086cd
#2838 explicitly skip changing when we would reinsert the same annota…
AlexanderSkrock Apr 13, 2023
015009a
#2838 added templating functionality to add annotations to annotated …
AlexanderSkrock Apr 13, 2023
d9978b6
#2838 added replacement of annotated types
AlexanderSkrock Apr 13, 2023
c47800c
#2838 auto format changes
AlexanderSkrock Apr 13, 2023
1d66e92
#2838 fix adding annotation on packages
AlexanderSkrock Apr 13, 2023
e25667b
#2838 removed todo after checking imports
AlexanderSkrock Apr 13, 2023
c00b156
#2838 using runtime dependencies for template parsing
AlexanderSkrock Apr 14, 2023
34ac829
#2838 fix javadoc
AlexanderSkrock Apr 14, 2023
34e6cb2
#2838 removed force adding imports
AlexanderSkrock Apr 14, 2023
4cd2f63
#2838 use type prefix on first annotation to maintain spacing
AlexanderSkrock Apr 14, 2023
ad095f6
#2838 use prefix from first annotation or type expression
AlexanderSkrock Apr 14, 2023
1d65443
#2838 remove first and last utility methods
AlexanderSkrock Apr 14, 2023
0b96e1e
#2838 removed call to apache commons lang
AlexanderSkrock Apr 14, 2023
3421ad1
#2838 reworked description for "additionalNullabilityAnnotations" option
AlexanderSkrock Apr 14, 2023
841be3f
#2838 first effort on filling the list of known annotations
AlexanderSkrock Apr 14, 2023
aa564b1
#2838 adding some more nullability annotations
AlexanderSkrock Apr 14, 2023
47e201d
#2838 added pre configured recipes
AlexanderSkrock Apr 14, 2023
00c3231
#2838 added some test cases for preconfigured recipes
AlexanderSkrock Apr 14, 2023
55c3095
#2838 integrated ShortenFullyQualifiedTypeReferences recipe
AlexanderSkrock Apr 17, 2023
ceefb76
#2838 added testcase for adding annotation using its fqn in edge cases
AlexanderSkrock Apr 17, 2023
40dd254
#2838 fixed testcase regarding using fqn in edge cases
AlexanderSkrock Apr 17, 2023
6ff0469
#2838 added todos regarding target types
AlexanderSkrock Apr 17, 2023
a3d8fc5
#2838 fixed licensing headers
AlexanderSkrock Apr 17, 2023
811a6a6
#2838 fixed test cases
AlexanderSkrock Apr 17, 2023
9b9a957
#2838 finalizing target type recognition
AlexanderSkrock Apr 18, 2023
38c6f2f
#2838 remove logger
AlexanderSkrock Apr 18, 2023
1a4b7e3
#2838 use EnumSet wherever possible
AlexanderSkrock Apr 19, 2023
09bc59c
#2838 use LinkedHashMap for replacement annotations to improve perfor…
AlexanderSkrock Apr 19, 2023
cf54d6f
#2838 use LinkedHashMap for replacement annotations to improve perfor…
AlexanderSkrock Apr 19, 2023
08651fe
#2838 remove todos for logging
AlexanderSkrock Apr 19, 2023
e1655e7
#2838 fix yml merge conflicts
AlexanderSkrock Apr 19, 2023
8e43c01
Update rewrite-java/src/main/resources/META-INF/rewrite/nullability.yml
AlexanderSkrock Apr 19, 2023
19f6f6d
#2838 using the termin "replace with"
AlexanderSkrock Apr 20, 2023
72261d7
#2838 added few more test cases
AlexanderSkrock Apr 20, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions rewrite-java-test/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,20 @@ dependencies {

testImplementation("io.github.classgraph:classgraph:latest.release")
testImplementation("org.junit-pioneer:junit-pioneer:2.0.0")

testRuntimeOnly(project(":rewrite-java-17"))
testRuntimeOnly("junit:junit:4.13.2") {
because("Used for RemoveUnneededAssertionTest")
}
testRuntimeOnly("com.google.code.findbugs:jsr305:3.0.2") {
because("Used for StandardizeNullabilityAnnotationsTest, UseJavaxNullabilityAnnotations and UseOpenRewriteNullabilityAnnotations")
}
testRuntimeOnly("org.springframework:spring-core:6.0.7") {
because("Used for StandardizeNullabilityAnnotationsTest and UseSpringNullabilityAnnotations")
}
testRuntimeOnly("jakarta.annotation:jakarta.annotation-api:2.1.1") {
because("Used for UseJakartaNullabilityAnnotations")
}
testRuntimeOnly("org.apache.hbase:hbase-shaded-client:2.4.11")
testRuntimeOnly("com.google.guava:guava:latest.release")
testRuntimeOnly("org.mapstruct:mapstruct:latest.release")
Expand Down
Loading