Skip to content

Commit 033c46f

Browse files
committed
DATAJPA-1443 - Polishing.
Original pull request: #295. Fixed more JavaDoc warnings by completing parameter and return value description.
1 parent 77ee416 commit 033c46f

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

src/main/java/org/springframework/data/jpa/domain/Specifications.java

+6-6
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,9 @@ public class Specifications<T> implements Specification<T>, Serializable {
5555
* Simple static factory method to add some syntactic sugar around a {@link Specification}.
5656
*
5757
* @deprecated since 2.0, use {@link Specification#where} instead
58-
* @param <T>
58+
* @param <T> type parameter for the specification parameter.
5959
* @param spec can be {@literal null}.
60-
* @return
60+
* @return a new Specifcations instance. Guaranteed to be not {@code null}.
6161
*/
6262
@Deprecated
6363
public static <T> Specifications<T> where(@Nullable Specification<T> spec) {
@@ -69,7 +69,7 @@ public static <T> Specifications<T> where(@Nullable Specification<T> spec) {
6969
*
7070
* @deprecated since 2.0, use {@link Specification#and} instead
7171
* @param other can be {@literal null}.
72-
* @return
72+
* @return a new Specifications instance combining this and the parameter instance. Guaranteed to be not {@code null}.
7373
*/
7474
@Deprecated
7575
public Specifications<T> and(@Nullable Specification<T> other) {
@@ -81,7 +81,7 @@ public Specifications<T> and(@Nullable Specification<T> other) {
8181
*
8282
* @deprecated since 2.0, use {@link Specification#or} instead
8383
* @param other can be {@literal null}.
84-
* @return
84+
* @return a new Specifications instance combining this and the parameter instance. Guaranteed to be not {@code null}.
8585
*/
8686
@Deprecated
8787
public Specifications<T> or(@Nullable Specification<T> other) {
@@ -92,9 +92,9 @@ public Specifications<T> or(@Nullable Specification<T> other) {
9292
* Negates the given {@link Specification}.
9393
*
9494
* @deprecated since 2.0, use {@link Specification#not} instead
95-
* @param <T>
95+
* @param <T> type parameter for the specification parameter.
9696
* @param spec can be {@literal null}.
97-
* @return
97+
* @return a new Specifications instance combining this and the parameter instance. Guaranteed to be not {@code null}.
9898
*/
9999
@Deprecated
100100
public static <T> Specifications<T> not(@Nullable Specification<T> spec) {

src/main/java/org/springframework/data/jpa/util/HibernateProxyDetector.java

+3-1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919

2020
import org.hibernate.proxy.HibernateProxy;
2121
import org.springframework.data.util.ProxyUtils.ProxyDetector;
22+
import org.springframework.lang.Nullable;
2223
import org.springframework.util.ClassUtils;
2324

2425
/**
@@ -43,7 +44,8 @@ public Class<?> getUserType(Class<?> type) {
4344
.orElse(type);
4445
}
4546

46-
private static final Class<?> loadHibernateProxyType() {
47+
@Nullable
48+
private static Class<?> loadHibernateProxyType() {
4749

4850
try {
4951
return ClassUtils.forName("org.hibernate.proxy.HibernateProxy", HibernateProxyDetector.class.getClassLoader());

0 commit comments

Comments
 (0)