Remove unnecessary @Nullable annotations

* `DefaultPersistenceUnitManager.java`
`dataSourceLookup` is initialized with a non-null `DataSourceLookup`, so `getDataSourceLookup()` does not return `null`.

* `TestContextTransactionUtils.java`
The transaction attribute name is stored as a non-null value, so `getName()` does not return `null`.

* `RequestContext.java`
The model is represented by a `Map` rather than a nullable value, so `getModel()` can return a non-null `Map`.

Closes gh-37379

Signed-off-by: Tran Ngoc Nhan <ngocnhan.tran1996@gmail.com>
This commit is contained in:
Tran Ngoc Nhan
2026-10-03 18:03:33 +02:00
committed by GitHub
parent 8f41c65fbc
commit e6b3007de5
3 changed files with 4 additions and 4 deletions
@@ -344,7 +344,7 @@ public class DefaultPersistenceUnitManager
* persistence provider, resolving data source names in {@code persistence.xml}
* against Spring-managed DataSource instances.
*/
public @Nullable DataSourceLookup getDataSourceLookup() {
public DataSourceLookup getDataSourceLookup() {
return this.dataSourceLookup;
}