提交 09008088 编写于 作者: J Juergen Hoeller

Method-level @SuppressWarnings("unchecked") for generic varargs

上级 873fc53a
/*
* 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");
* 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);
}
public void registerBean(Class<?> annotatedClass,
@SuppressWarnings("unchecked") Class<? extends Annotation>... qualifiers) {
@SuppressWarnings("unchecked")
public void registerBean(Class<?> annotatedClass, Class<? extends Annotation>... qualifiers) {
registerBean(annotatedClass, null, qualifiers);
}
public void registerBean(Class<?> annotatedClass, String name,
@SuppressWarnings("unchecked") Class<? extends Annotation>... qualifiers) {
@SuppressWarnings("unchecked")
public void registerBean(Class<?> annotatedClass, String name, Class<? extends Annotation>... qualifiers) {
AnnotatedGenericBeanDefinition abd = new AnnotatedGenericBeanDefinition(annotatedClass);
if (this.conditionEvaluator.shouldSkip(abd.getMetadata())) {
return;
......
/*
* 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");
* 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
* @return array of number of rows affected
*/
@SuppressWarnings("unchecked")
protected int[] doExecuteBatch(Map<String, ?>... batch) {
checkCompiled();
List<List<Object>> batchValues = new ArrayList<List<Object>>(batch.length);
......
/*
* 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");
* you may not use this file except in compliance with the License.
......@@ -148,6 +148,7 @@ public class SimpleJdbcInsert extends AbstractJdbcInsert implements SimpleJdbcIn
}
@Override
@SuppressWarnings("unchecked")
public int[] executeBatch(Map<String, ?>... batch) {
return doExecuteBatch(batch);
}
......
/*
* 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");
* 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
* @return the array of number of rows affected as returned by the JDBC driver
*/
@SuppressWarnings("unchecked")
int[] executeBatch(Map<String, ?>... batch);
/**
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册