1
1
/*
2
- * Copyright 2008-2017 the original author or authors.
2
+ * Copyright 2008-2018 the original author or authors.
3
3
*
4
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
5
* you may not use this file except in compliance with the License.
@@ -87,7 +87,8 @@ private NamedQuery(JpaQueryMethod method, EntityManager em) {
87
87
/**
88
88
* Returns whether the named query with the given name exists.
89
89
*
90
- * @param em
90
+ * @param em must not be {@literal null}.
91
+ * @param queryName must not be {@literal null}.
91
92
* @return
92
93
*/
93
94
private static boolean hasNamedQuery (EntityManager em , String queryName ) {
@@ -112,7 +113,8 @@ private static boolean hasNamedQuery(EntityManager em, String queryName) {
112
113
/**
113
114
* Looks up a named query for the given {@link org.springframework.data.repository.query.QueryMethod}.
114
115
*
115
- * @param method
116
+ * @param method must not be {@literal null}.
117
+ * @param em must not be {@literal null}.
116
118
* @return
117
119
*/
118
120
@ Nullable
@@ -154,7 +156,7 @@ protected Query doCreateQuery(Object[] values) {
154
156
protected TypedQuery <Long > doCreateCountQuery (Object [] values ) {
155
157
156
158
EntityManager em = getEntityManager ();
157
- TypedQuery <Long > countQuery = null ;
159
+ TypedQuery <Long > countQuery ;
158
160
159
161
if (namedCountQueryIsPresent ) {
160
162
countQuery = em .createNamedQuery (countQueryName , Long .class );
0 commit comments