Polish Hibernate support and tests

- Fix Javadoc in HibernateTemplate so that it compiles in Eclipse.
 - Suppress generics warnings in HibernateTemplateTests.
 - Remove unnecessary deprecation warning suppression in constructor for
   LocalSessionFactoryBuilder.
master
Sam Brannen 11 years ago
parent 5f8275a305
commit 63e023173b
  1. 2
      spring-orm-hibernate4/src/main/java/org/springframework/orm/hibernate4/HibernateTemplate.java
  2. 1
      spring-orm-hibernate4/src/main/java/org/springframework/orm/hibernate4/LocalSessionFactoryBuilder.java
  3. 2
      spring-orm-hibernate4/src/test/java/org/springframework/orm/hibernate4/HibernateTemplateTests.java
  4. 3
      spring-orm/src/test/java/org/springframework/orm/hibernate3/HibernateTemplateTests.java

@ -144,7 +144,7 @@ public class HibernateTemplate implements HibernateOperations, InitializingBean
* Sessions (for example, within a transaction).
* @see #enableFilters(org.hibernate.Session)
* @see org.hibernate.Session#enableFilter(String)
* @see org.springframework.orm.hibernate3.LocalSessionFactoryBean#setFilterDefinitions
* @see org.springframework.orm.hibernate3.LocalSessionFactoryBean#setFilterDefinitions(org.springframework.orm.hibernate3.FilterDefinition...)
*/
public void setFilterNames(String... filterNames) {
this.filterNames = filterNames;

@ -133,7 +133,6 @@ public class LocalSessionFactoryBuilder extends Configuration {
* (may be {@code null})
* @param resourceLoader the ResourceLoader to load application classes from
*/
@SuppressWarnings("deprecation")
public LocalSessionFactoryBuilder(DataSource dataSource, ResourceLoader resourceLoader) {
getProperties().put(Environment.CURRENT_SESSION_CONTEXT_CLASS, SpringSessionContext.class.getName());
if (dataSource != null) {

@ -52,7 +52,6 @@ import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.mockito.InOrder;
import org.springframework.dao.CannotAcquireLockException;
import org.springframework.dao.DataAccessResourceFailureException;
import org.springframework.dao.DataIntegrityViolationException;
@ -69,6 +68,7 @@ import static org.mockito.BDDMockito.*;
* @author Juergen Hoeller
* @since 4.0.1
*/
@SuppressWarnings({ "rawtypes", "unchecked" })
public class HibernateTemplateTests {
private SessionFactory sessionFactory;

@ -1,5 +1,5 @@
/*
* Copyright 2002-2013 the original author or authors.
* Copyright 2002-2014 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -73,6 +73,7 @@ import static org.mockito.BDDMockito.*;
* @author Phillip Webb
* @since 05.03.2005
*/
@SuppressWarnings({ "rawtypes", "unchecked" })
public class HibernateTemplateTests {
private SessionFactory sessionFactory;

Loading…
Cancel
Save