mirror of
https://github.com/spring-projects/spring-framework.git
synced 2026-09-23 06:29:10 +00:00
Polishing
This commit is contained in:
+2
-2
@@ -40,9 +40,9 @@ public class HibernateQueryException extends InvalidDataAccessResourceUsageExcep
|
||||
* Return the HQL query string that was invalid.
|
||||
*/
|
||||
@Nullable
|
||||
@SuppressWarnings("NullAway")
|
||||
public String getQueryString() {
|
||||
return ((QueryException) getCause()).getQueryString();
|
||||
QueryException cause = (QueryException) getCause();
|
||||
return (cause != null ? cause.getQueryString() : null);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+3
-6
@@ -120,7 +120,6 @@ public class LocalSessionFactoryBuilder extends Configuration {
|
||||
|
||||
private final ResourcePatternResolver resourcePatternResolver;
|
||||
|
||||
@Nullable
|
||||
private TypeFilter[] entityTypeFilters = DEFAULT_ENTITY_TYPE_FILTERS;
|
||||
|
||||
|
||||
@@ -379,11 +378,9 @@ public class LocalSessionFactoryBuilder extends Configuration {
|
||||
* the current class descriptor contained in the metadata reader.
|
||||
*/
|
||||
private boolean matchesEntityTypeFilter(MetadataReader reader, MetadataReaderFactory readerFactory) throws IOException {
|
||||
if (this.entityTypeFilters != null) {
|
||||
for (TypeFilter filter : this.entityTypeFilters) {
|
||||
if (filter.match(reader, readerFactory)) {
|
||||
return true;
|
||||
}
|
||||
for (TypeFilter filter : this.entityTypeFilters) {
|
||||
if (filter.match(reader, readerFactory)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user