Commit f813712
committed
Consistent use of @nullable across the codebase (even for internals)
Beyond just formally declaring the current behavior, this revision actually enforces non-null behavior in selected signatures now, not tolerating null values anymore when not explicitly documented. It also changes some utility methods with historic null-in/null-out tolerance towards enforced non-null return values, making them a proper citizen in non-null assignments.
Some issues are left as to-do: in particular a thorough revision of spring-test, and a few tests with unclear failures (ignored as "TODO: NULLABLE") to be sorted out in a follow-up commit.
Issue: SPR-155401 parent ffc3f6d commit f813712
File tree
1,493 files changed
+10639
-9141
lines changed- spring-aop/src/main/java/org/springframework/aop
- aspectj
- annotation
- autoproxy
- config
- framework
- adapter
- autoproxy
- interceptor
- scope
- support
- annotation
- target
- spring-aspects/src/test/resources/org/springframework/cache/config
- spring-beans-groovy/src/main/java/org/springframework/beans/factory/groovy
- spring-beans/src
- main/java/org/springframework/beans
- annotation
- factory
- annotation
- config
- parsing
- support
- wiring
- xml
- propertyeditors
- support
- test/java/org/springframework/beans
- factory
- config
- xml
- propertyeditors
- spring-context-support/src/main/java/org/springframework
- cache
- caffeine
- ehcache
- jcache
- config
- interceptor
- transaction
- mail
- javamail
- scheduling
- commonj
- quartz
- ui/freemarker
- spring-context/src
- main/java/org/springframework
- cache
- annotation
- concurrent
- config
- interceptor
- support
- context
- annotation
- config
- event
- expression
- i18n
- support
- weaving
- ejb/access
- format
- datetime
- joda
- standard
- number
- money
- support
- instrument/classloading
- glassfish
- jboss
- tomcat
- weblogic
- websphere
- jmx
- access
- export
- annotation
- assembler
- metadata
- naming
- support
- jndi
- support
- scheduling
- annotation
- concurrent
- config
- support
- scripting
- bsh
- config
- groovy
- support
- ui
- context/support
- validation
- beanvalidation
- test/java/org/springframework
- cache
- interceptor
- context/annotation
- ejb/access
- format/number
- jmx/export
- mock/env
- spring-core/src
- main/java/org/springframework
- core
- annotation
- codec
- convert
- converter
- support
- env
- io
- buffer
- support
- style
- type
- classreading
- filter
- lang
- util
- comparator
- concurrent
- xml
- test/java/org/springframework
- core
- annotation
- io
- mock/env
- util
- spring-expression/src
- main/java/org/springframework/expression
- common
- spel
- ast
- standard
- support
- test/java/org/springframework/expression/spel
- spring-jdbc/src/main/java/org/springframework/jdbc
- config
- core
- metadata
- namedparam
- simple
- support
- datasource
- embedded
- init
- lookup
- object
- support
- lob
- xml
- spring-jms/src
- main/java/org/springframework/jms
- annotation
- config
- connection
- core
- listener
- adapter
- endpoint
- remoting
- support
- converter
- test/java/org/springframework/jms
- core
- support/converter
- spring-messaging/src
- main/java/org/springframework/messaging
- converter
- core
- handler
- annotation/support
- invocation
- simp
- annotation/support
- broker
- config
- stomp
- user
- support
- tcp
- reactor
- test/java/org/springframework/messaging
- converter
- simp
- annotation/support
- stomp
- user
- support
- spring-orm/src/main/java/org/springframework/orm
- hibernate5
- support
- jpa
- persistenceunit
- support
- vendor
- spring-oxm/src/main/java/org/springframework/oxm
- castor
- jaxb
- jibx
- support
- xstream
- spring-test/src
- main/java/org/springframework
- mock/http
- test/web
- client
- response
- servlet/setup
- test/java/org/springframework/test/web/client
- response
- spring-tx/src
- main/java/org/springframework
- dao
- support
- jca
- cci
- connection
- core
- support
- object
- context
- endpoint
- work
- transaction
- interceptor
- jta
- support
- test/java/org/springframework
- jca/cci
- transaction
- interceptor
- spring-webflux/src
- main/java/org/springframework/web/reactive
- accept
- config
- function
- client
- server
- support
- handler
- resource
- result
- condition
- method
- annotation
- view
- freemarker
- script
- socket
- adapter
- server
- support
- upgrade
- test/java/org/springframework/web/reactive/result/method/annotation
- spring-webmvc/src
- main/java/org/springframework/web/servlet
- config
- annotation
- handler
- i18n
- mvc
- annotation
- condition
- method
- annotation
- support
- resource
- support
- tags
- form
- theme
- view
- document
- freemarker
- groovy
- json
- script
- tiles3
- xml
- xslt
- test/java/org/springframework/web/servlet
- config/annotation
- mvc/method
- annotation
- tags
- view
- spring-websocket/src
- main/java/org/springframework/web/socket
- adapter
- jetty
- standard
- client
- standard
- config
- annotation
- handler
- messaging
- server
- standard
- support
- sockjs
- client
- frame
- support
- transport
- handler
- session
- test/java/org/springframework/web/socket/messaging
- spring-web/src
- main/java/org/springframework
- http
- client
- support
- codec
- json
- multipart
- xml
- converter
- json
- protobuf
- xml
- server/reactive
- remoting
- caucho
- httpinvoker
- jaxws
- web
- accept
- bind
- support
- client
- context
- request
- async
- support
- cors
- reactive
- filter
- jsf/el
- method
- annotation
- support
- multipart
- commons
- support
- server
- adapter
- util
- pattern
- test/java/org/springframework
- http
- converter/json
- web
- client
- util
- src/test/java/com/foo
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
1,493 files changed
+10639
-9141
lines changedLines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
Lines changed: 6 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| 34 | + | |
34 | 35 | | |
35 | 36 | | |
36 | 37 | | |
37 | 38 | | |
38 | 39 | | |
39 | | - | |
40 | | - | |
41 | | - | |
| 40 | + | |
| 41 | + | |
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
49 | | - | |
50 | | - | |
51 | | - | |
| 49 | + | |
| 50 | + | |
52 | 51 | | |
53 | 52 | | |
54 | 53 | | |
| |||
Lines changed: 20 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
208 | 208 | | |
209 | 209 | | |
210 | 210 | | |
| 211 | + | |
211 | 212 | | |
212 | 213 | | |
213 | 214 | | |
| |||
296 | 297 | | |
297 | 298 | | |
298 | 299 | | |
299 | | - | |
300 | | - | |
| 300 | + | |
| 301 | + | |
301 | 302 | | |
302 | 303 | | |
303 | 304 | | |
| |||
306 | 307 | | |
307 | 308 | | |
308 | 309 | | |
| 310 | + | |
309 | 311 | | |
310 | 312 | | |
311 | 313 | | |
| |||
330 | 332 | | |
331 | 333 | | |
332 | 334 | | |
333 | | - | |
334 | | - | |
| 335 | + | |
| 336 | + | |
335 | 337 | | |
336 | 338 | | |
337 | 339 | | |
| |||
549 | 551 | | |
550 | 552 | | |
551 | 553 | | |
552 | | - | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
553 | 557 | | |
554 | 558 | | |
555 | 559 | | |
| |||
608 | 612 | | |
609 | 613 | | |
610 | 614 | | |
611 | | - | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
612 | 619 | | |
613 | 620 | | |
614 | 621 | | |
615 | 622 | | |
616 | | - | |
617 | | - | |
| 623 | + | |
| 624 | + | |
618 | 625 | | |
619 | 626 | | |
620 | 627 | | |
| |||
649 | 656 | | |
650 | 657 | | |
651 | 658 | | |
| 659 | + | |
652 | 660 | | |
653 | 661 | | |
654 | 662 | | |
| |||
663 | 671 | | |
664 | 672 | | |
665 | 673 | | |
| 674 | + | |
666 | 675 | | |
667 | | - | |
| 676 | + | |
| 677 | + | |
668 | 678 | | |
669 | 679 | | |
670 | 680 | | |
| |||
Lines changed: 5 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
20 | 21 | | |
21 | 22 | | |
22 | 23 | | |
| |||
40 | 41 | | |
41 | 42 | | |
42 | 43 | | |
43 | | - | |
| 44 | + | |
| 45 | + | |
44 | 46 | | |
| 47 | + | |
45 | 48 | | |
46 | 49 | | |
47 | 50 | | |
spring-aop/src/main/java/org/springframework/aop/aspectj/AspectJAdviceParameterNameDiscoverer.java
Lines changed: 8 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
183 | 183 | | |
184 | 184 | | |
185 | 185 | | |
186 | | - | |
| 186 | + | |
187 | 187 | | |
188 | 188 | | |
189 | 189 | | |
| 190 | + | |
190 | 191 | | |
191 | 192 | | |
192 | 193 | | |
| |||
214 | 215 | | |
215 | 216 | | |
216 | 217 | | |
| 218 | + | |
217 | 219 | | |
218 | 220 | | |
219 | 221 | | |
| |||
475 | 477 | | |
476 | 478 | | |
477 | 479 | | |
478 | | - | |
479 | | - | |
| 480 | + | |
| 481 | + | |
480 | 482 | | |
481 | 483 | | |
482 | 484 | | |
| |||
498 | 500 | | |
499 | 501 | | |
500 | 502 | | |
501 | | - | |
| 503 | + | |
502 | 504 | | |
503 | 505 | | |
504 | 506 | | |
| |||
781 | 783 | | |
782 | 784 | | |
783 | 785 | | |
784 | | - | |
| 786 | + | |
785 | 787 | | |
786 | 788 | | |
787 | 789 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
Lines changed: 18 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
| 60 | + | |
60 | 61 | | |
61 | 62 | | |
62 | 63 | | |
| |||
196 | 197 | | |
197 | 198 | | |
198 | 199 | | |
| 200 | + | |
199 | 201 | | |
200 | 202 | | |
201 | 203 | | |
| |||
209 | 211 | | |
210 | 212 | | |
211 | 213 | | |
212 | | - | |
| 214 | + | |
213 | 215 | | |
214 | 216 | | |
215 | 217 | | |
216 | 218 | | |
217 | 219 | | |
218 | 220 | | |
219 | | - | |
| 221 | + | |
220 | 222 | | |
221 | 223 | | |
222 | 224 | | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
223 | 231 | | |
224 | 232 | | |
225 | 233 | | |
226 | | - | |
| 234 | + | |
227 | 235 | | |
228 | 236 | | |
229 | 237 | | |
| |||
301 | 309 | | |
302 | 310 | | |
303 | 311 | | |
304 | | - | |
| 312 | + | |
| 313 | + | |
305 | 314 | | |
306 | 315 | | |
307 | 316 | | |
| |||
354 | 363 | | |
355 | 364 | | |
356 | 365 | | |
357 | | - | |
| 366 | + | |
358 | 367 | | |
359 | 368 | | |
360 | 369 | | |
| |||
375 | 384 | | |
376 | 385 | | |
377 | 386 | | |
| 387 | + | |
378 | 388 | | |
379 | 389 | | |
380 | 390 | | |
| |||
411 | 421 | | |
412 | 422 | | |
413 | 423 | | |
414 | | - | |
| 424 | + | |
415 | 425 | | |
416 | 426 | | |
417 | 427 | | |
| |||
600 | 610 | | |
601 | 611 | | |
602 | 612 | | |
603 | | - | |
| 613 | + | |
604 | 614 | | |
605 | 615 | | |
606 | 616 | | |
| |||
Lines changed: 4 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| 23 | + | |
23 | 24 | | |
24 | 25 | | |
25 | 26 | | |
| |||
37 | 38 | | |
38 | 39 | | |
39 | 40 | | |
| 41 | + | |
40 | 42 | | |
41 | 43 | | |
42 | 44 | | |
| |||
45 | 47 | | |
46 | 48 | | |
47 | 49 | | |
| 50 | + | |
48 | 51 | | |
49 | 52 | | |
50 | 53 | | |
| |||
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
212 | 212 | | |
213 | 213 | | |
214 | 214 | | |
| 215 | + | |
215 | 216 | | |
216 | 217 | | |
217 | 218 | | |
| |||
Lines changed: 4 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
119 | 119 | | |
120 | 120 | | |
121 | 121 | | |
122 | | - | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
123 | 125 | | |
124 | 126 | | |
125 | 127 | | |
| |||
0 commit comments