Housecleaning of build warnings
This commit is contained in:
@@ -33,7 +33,7 @@ import org.springframework.util.StringUtils;
|
||||
*
|
||||
* @param <E> entity returned by executing the query
|
||||
*/
|
||||
public class HibernateNativeQueryProvider<E> extends AbstractHibernateQueryProvider {
|
||||
public class HibernateNativeQueryProvider<E> extends AbstractHibernateQueryProvider<E> {
|
||||
|
||||
private String sqlQuery;
|
||||
|
||||
@@ -46,7 +46,8 @@ public class HibernateNativeQueryProvider<E> extends AbstractHibernateQueryProvi
|
||||
* </p>
|
||||
*/
|
||||
@Override
|
||||
public NativeQuery createQuery() {
|
||||
@SuppressWarnings("unchecked")
|
||||
public NativeQuery<E> createQuery() {
|
||||
|
||||
if (isStatelessSession()) {
|
||||
return getStatelessSession().createNativeQuery(sqlQuery).addEntity(entityClass);
|
||||
|
||||
@@ -402,7 +402,7 @@ public class BeanWrapperFieldSetMapper<T> extends DefaultPropertyEditorRegistrar
|
||||
* Public setter for the 'conversionService' property.
|
||||
* {@link #createBinder(Object)} will use it if not null.
|
||||
*
|
||||
* @param conversionService
|
||||
* @param conversionService {@link ConversionService} to be used for type conversions
|
||||
*/
|
||||
public void setConversionService(ConversionService conversionService) {
|
||||
this.conversionService = conversionService;
|
||||
|
||||
@@ -20,6 +20,8 @@ import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
/**
|
||||
* Abstract class handling common concerns of various {@link LineTokenizer}
|
||||
* implementations such as dealing with names and actual construction of
|
||||
@@ -80,7 +82,22 @@ public abstract class AbstractLineTokenizer implements LineTokenizer {
|
||||
* @param names names of each column
|
||||
*/
|
||||
public void setNames(String... names) {
|
||||
this.names = names==null ? null : Arrays.asList(names).toArray(new String[names.length]);
|
||||
if(names == null) {
|
||||
this.names = null;
|
||||
}
|
||||
else {
|
||||
boolean valid = false;
|
||||
for (String name : names) {
|
||||
if(StringUtils.hasText(name)) {
|
||||
valid = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if(valid) {
|
||||
this.names = Arrays.asList(names).toArray(new String[names.length]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -40,7 +40,7 @@ public class SynchronizedItemStreamReaderBuilder<T> {
|
||||
* @return this instance for method chaining
|
||||
* @see SynchronizedItemStreamReader#setDelegate(ItemStreamReader)
|
||||
*/
|
||||
public SynchronizedItemStreamReaderBuilder delegate(ItemStreamReader<T> delegate) {
|
||||
public SynchronizedItemStreamReaderBuilder<T> delegate(ItemStreamReader<T> delegate) {
|
||||
this.delegate = delegate;
|
||||
|
||||
return this;
|
||||
|
||||
Reference in New Issue
Block a user