Method-level @SuppressWarnings("unchecked") for generic varargs
This commit is contained in:
parent
873fc53a2f
commit
0900808820
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2002-2013 the original author or authors.
|
* Copyright 2002-2016 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
@ -127,15 +127,13 @@ public class AnnotatedBeanDefinitionReader {
|
||||||
registerBean(annotatedClass, null, (Class<? extends Annotation>[]) null);
|
registerBean(annotatedClass, null, (Class<? extends Annotation>[]) null);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void registerBean(Class<?> annotatedClass,
|
@SuppressWarnings("unchecked")
|
||||||
@SuppressWarnings("unchecked") Class<? extends Annotation>... qualifiers) {
|
public void registerBean(Class<?> annotatedClass, Class<? extends Annotation>... qualifiers) {
|
||||||
|
|
||||||
registerBean(annotatedClass, null, qualifiers);
|
registerBean(annotatedClass, null, qualifiers);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void registerBean(Class<?> annotatedClass, String name,
|
@SuppressWarnings("unchecked")
|
||||||
@SuppressWarnings("unchecked") Class<? extends Annotation>... qualifiers) {
|
public void registerBean(Class<?> annotatedClass, String name, Class<? extends Annotation>... qualifiers) {
|
||||||
|
|
||||||
AnnotatedGenericBeanDefinition abd = new AnnotatedGenericBeanDefinition(annotatedClass);
|
AnnotatedGenericBeanDefinition abd = new AnnotatedGenericBeanDefinition(annotatedClass);
|
||||||
if (this.conditionEvaluator.shouldSkip(abd.getMetadata())) {
|
if (this.conditionEvaluator.shouldSkip(abd.getMetadata())) {
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2002-2015 the original author or authors.
|
* Copyright 2002-2016 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
@ -542,6 +542,7 @@ public abstract class AbstractJdbcInsert {
|
||||||
* @param batch array of Maps with parameter names and values to be used in batch insert
|
* @param batch array of Maps with parameter names and values to be used in batch insert
|
||||||
* @return array of number of rows affected
|
* @return array of number of rows affected
|
||||||
*/
|
*/
|
||||||
|
@SuppressWarnings("unchecked")
|
||||||
protected int[] doExecuteBatch(Map<String, ?>... batch) {
|
protected int[] doExecuteBatch(Map<String, ?>... batch) {
|
||||||
checkCompiled();
|
checkCompiled();
|
||||||
List<List<Object>> batchValues = new ArrayList<List<Object>>(batch.length);
|
List<List<Object>> batchValues = new ArrayList<List<Object>>(batch.length);
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2002-2014 the original author or authors.
|
* Copyright 2002-2016 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
@ -148,6 +148,7 @@ public class SimpleJdbcInsert extends AbstractJdbcInsert implements SimpleJdbcIn
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@SuppressWarnings("unchecked")
|
||||||
public int[] executeBatch(Map<String, ?>... batch) {
|
public int[] executeBatch(Map<String, ?>... batch) {
|
||||||
return doExecuteBatch(batch);
|
return doExecuteBatch(batch);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2002-2014 the original author or authors.
|
* Copyright 2002-2016 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
@ -152,6 +152,7 @@ public interface SimpleJdbcInsertOperations {
|
||||||
* @param batch an array of Maps containing a batch of column names and corresponding value
|
* @param batch an array of Maps containing a batch of column names and corresponding value
|
||||||
* @return the array of number of rows affected as returned by the JDBC driver
|
* @return the array of number of rows affected as returned by the JDBC driver
|
||||||
*/
|
*/
|
||||||
|
@SuppressWarnings("unchecked")
|
||||||
int[] executeBatch(Map<String, ?>... batch);
|
int[] executeBatch(Map<String, ?>... batch);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue