1717
1818import javax .persistence .EntityManager ;
1919
20- import org .slf4j .Logger ;
21- import org .slf4j .LoggerFactory ;
22-
2320import org .springframework .data .repository .query .QueryMethodEvaluationContextProvider ;
2421import org .springframework .data .repository .query .RepositoryQuery ;
2522import org .springframework .expression .spel .standard .SpelExpressionParser ;
@@ -36,7 +33,6 @@ enum JpaQueryFactory {
3633 INSTANCE ;
3734
3835 private static final SpelExpressionParser PARSER = new SpelExpressionParser ();
39- private static final Logger LOG = LoggerFactory .getLogger (JpaQueryFactory .class );
4036
4137 /**
4238 * Creates a {@link RepositoryQuery} from the given {@link String} query.
@@ -48,15 +44,10 @@ enum JpaQueryFactory {
4844 * @param evaluationContextProvider
4945 * @return
5046 */
51- @ Nullable
52- AbstractJpaQuery fromMethodWithQueryString (JpaQueryMethod method , EntityManager em , @ Nullable String queryString ,
47+ AbstractJpaQuery fromMethodWithQueryString (JpaQueryMethod method , EntityManager em , String queryString ,
5348 @ Nullable String countQueryString ,
5449 QueryMethodEvaluationContextProvider evaluationContextProvider ) {
5550
56- if (queryString == null ) {
57- return null ;
58- }
59-
6051 return method .isNativeQuery ()
6152 ? new NativeJpaQuery (method , em , queryString , countQueryString , evaluationContextProvider , PARSER )
6253 : new SimpleJpaQuery (method , em , queryString , countQueryString , evaluationContextProvider , PARSER );
@@ -69,13 +60,7 @@ AbstractJpaQuery fromMethodWithQueryString(JpaQueryMethod method, EntityManager
6960 * @param em must not be {@literal null}.
7061 * @return
7162 */
72- @ Nullable
7363 public StoredProcedureJpaQuery fromProcedureAnnotation (JpaQueryMethod method , EntityManager em ) {
74-
75- if (!method .isProcedureQuery ()) {
76- return null ;
77- }
78-
7964 return new StoredProcedureJpaQuery (method , em );
8065 }
8166}
0 commit comments