@@ -333,8 +333,8 @@ class JpaPersistentPropertyImpl extends AnnotationBasedPersistentProperty<JpaPer
|
||||
continue;
|
||||
}
|
||||
|
||||
// may cause NullPointerException if the returned value is null
|
||||
return (boolean) AnnotationUtils.getValue(annotation, "updatable");
|
||||
final Object updatable = AnnotationUtils.getValue(annotation, "updatable");
|
||||
return (boolean) (updatable == null ? true : updatable);
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
@@ -15,6 +15,8 @@
|
||||
*/
|
||||
package org.springframework.data.jpa.repository.config;
|
||||
|
||||
import static org.springframework.data.jpa.repository.config.BeanDefinitionNames.*;
|
||||
|
||||
import java.lang.annotation.Annotation;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collection;
|
||||
@@ -52,8 +54,6 @@ import org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcesso
|
||||
import org.springframework.util.ClassUtils;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
import static org.springframework.data.jpa.repository.config.BeanDefinitionNames.*;
|
||||
|
||||
/**
|
||||
* JPA specific configuration extension parsing custom attributes from the XML namespace and
|
||||
* {@link EnableJpaRepositories} annotation. Also, it registers bean definitions for a
|
||||
|
||||
@@ -263,6 +263,7 @@ class StringQuery implements DeclaredQuery {
|
||||
Integer parameterIndex = getParameterIndex(parameterIndexString);
|
||||
|
||||
String typeSource = matcher.group(COMPARISION_TYPE_GROUP);
|
||||
Assert.isTrue(parameterIndexString != null || parameterName != null, () -> String.format("We need either a name or an index! Offending query string: %s", query));
|
||||
String expression = spelExtractor.getParameter(parameterName == null ? parameterIndexString : parameterName);
|
||||
String replacement = null;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user