Skip to content

Commit cf83e41

Browse files
dukbongmp911de
authored andcommitted
Use Assert.notNull for null check.
Closes #3441
1 parent 5d86bc7 commit cf83e41

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

spring-data-jpa/src/main/java/org/springframework/data/jpa/mapping/JpaMetamodelMappingContext.java

+2-4
Original file line numberDiff line numberDiff line change
@@ -136,10 +136,8 @@ public JpaMetamodel getRequiredMetamodel(TypeInformation<?> type) {
136136

137137
JpaMetamodel metamodel = getMetamodel(type);
138138

139-
if (metamodel == null) {
140-
throw new IllegalArgumentException(String.format("Required JpaMetamodel not found for %s", type));
141-
}
142-
139+
Assert.notNull(metamodel, () -> String.format("Required JpaMetamodel not found for %s", type));
140+
143141
return metamodel;
144142
}
145143

0 commit comments

Comments
 (0)