Consistent formatting of license headers, package javadocs, and import declarations

This commit is contained in:
Juergen Hoeller
2014-10-21 00:30:42 +02:00
parent b6fdcffc94
commit 8325b10080
2059 changed files with 3944 additions and 5473 deletions

View File

@@ -21,6 +21,7 @@ import javax.sql.DataSource;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.springframework.beans.PropertyValue;
import org.springframework.beans.factory.config.BeanDefinition;
import org.springframework.beans.factory.support.DefaultListableBeanFactory;

View File

@@ -16,13 +16,12 @@
package org.springframework.jdbc.core;
import static org.junit.Assert.assertEquals;
import java.util.List;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.springframework.beans.TypeMismatchException;
import org.springframework.dao.InvalidDataAccessApiUsageException;
import org.springframework.jdbc.core.test.ConcretePerson;
@@ -30,6 +29,8 @@ import org.springframework.jdbc.core.test.ExtendedPerson;
import org.springframework.jdbc.core.test.Person;
import org.springframework.jdbc.core.test.SpacePerson;
import static org.junit.Assert.*;
/**
* @author Thomas Risberg
* @author Juergen Hoeller

View File

@@ -26,7 +26,6 @@ import java.sql.SQLException;
import java.sql.Statement;
import java.util.List;
import java.util.Map;
import javax.sql.DataSource;
import org.junit.Before;

View File

@@ -31,13 +31,13 @@ import java.util.Arrays;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import javax.sql.DataSource;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.springframework.dao.DataAccessException;
import org.springframework.dao.InvalidDataAccessApiUsageException;
import org.springframework.jdbc.BadSqlGrammarException;

View File

@@ -25,10 +25,10 @@ import java.sql.Types;
import java.util.List;
import junit.framework.TestCase;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.springframework.jdbc.datasource.SingleConnectionDataSource;
import org.springframework.jdbc.support.SQLStateSQLExceptionTranslator;
import org.springframework.tests.sample.beans.TestBean;

View File

@@ -19,11 +19,12 @@ package org.springframework.jdbc.core.namedparam;
import java.sql.Types;
import java.util.Arrays;
import static org.junit.Assert.*;
import org.junit.Test;
import org.springframework.tests.sample.beans.TestBean;
import static org.junit.Assert.*;
/**
* @author Rick Evans
* @author Juergen Hoeller

View File

@@ -16,11 +16,12 @@
package org.springframework.jdbc.core.namedparam;
import static org.junit.Assert.assertEquals;
import org.junit.Test;
import org.springframework.jdbc.core.SqlParameterValue;
import static org.junit.Assert.*;
/**
* @author Rick Evans
* @author Arjen Poutsma

View File

@@ -27,13 +27,13 @@ import java.util.HashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import javax.sql.DataSource;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.springframework.dao.DataAccessException;
import org.springframework.jdbc.Customer;
import org.springframework.jdbc.core.JdbcOperations;

View File

@@ -27,12 +27,12 @@ import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.sql.DataSource;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.springframework.jdbc.core.RowMapper;
import static org.junit.Assert.*;

View File

@@ -6,12 +6,12 @@ import java.sql.Types;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import javax.sql.DataSource;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.springframework.jdbc.core.SqlInOutParameter;
import org.springframework.jdbc.core.SqlOutParameter;
import org.springframework.jdbc.core.SqlParameter;

View File

@@ -16,18 +16,19 @@
package org.springframework.jdbc.core.simple;
import static org.junit.Assert.assertEquals;
import java.util.List;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.springframework.dao.InvalidDataAccessApiUsageException;
import org.springframework.jdbc.core.AbstractRowMapperTests;
import org.springframework.jdbc.core.test.ConcretePerson;
import org.springframework.jdbc.core.test.Person;
import static org.junit.Assert.*;
/**
* @author Thomas Risberg
*/

View File

@@ -22,13 +22,13 @@ import java.sql.DatabaseMetaData;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Types;
import javax.sql.DataSource;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.springframework.dao.InvalidDataAccessApiUsageException;
import org.springframework.jdbc.BadSqlGrammarException;
import org.springframework.jdbc.core.SqlOutParameter;

View File

@@ -20,7 +20,6 @@ import java.sql.Connection;
import java.sql.DatabaseMetaData;
import java.sql.ResultSet;
import java.util.HashMap;
import javax.sql.DataSource;
import org.junit.After;
@@ -28,6 +27,7 @@ import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.springframework.dao.InvalidDataAccessApiUsageException;
import static org.mockito.BDDMockito.*;

View File

@@ -28,11 +28,11 @@ import java.util.HashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import javax.sql.DataSource;
import org.junit.Before;
import org.junit.Test;
import org.springframework.jdbc.core.JdbcOperations;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.jdbc.core.namedparam.MapSqlParameterSource;

View File

@@ -23,11 +23,11 @@ import java.sql.Types;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import javax.sql.DataSource;
import org.junit.Before;
import org.junit.Test;
import org.springframework.jdbc.core.SqlParameterValue;
import org.springframework.jdbc.core.metadata.TableMetaDataContext;
import org.springframework.jdbc.core.namedparam.MapSqlParameterSource;

View File

@@ -19,10 +19,10 @@ package org.springframework.jdbc.core.support;
import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.Statement;
import javax.sql.DataSource;
import org.junit.Test;
import org.springframework.beans.factory.support.DefaultListableBeanFactory;
import org.springframework.tests.sample.beans.TestBean;

View File

@@ -18,10 +18,10 @@ package org.springframework.jdbc.core.support;
import java.util.ArrayList;
import java.util.List;
import javax.sql.DataSource;
import org.junit.Test;
import org.springframework.jdbc.core.JdbcTemplate;
import static org.junit.Assert.*;

View File

@@ -24,6 +24,7 @@ import java.sql.SQLException;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.springframework.dao.DataAccessException;
import org.springframework.dao.IncorrectResultSizeDataAccessException;
import org.springframework.jdbc.LobRetrievalFailureException;

View File

@@ -29,6 +29,7 @@ import org.junit.rules.ExpectedException;
import org.mockito.ArgumentCaptor;
import org.mockito.Captor;
import org.mockito.MockitoAnnotations;
import org.springframework.jdbc.support.lob.LobCreator;
import org.springframework.jdbc.support.lob.LobHandler;

View File

@@ -21,7 +21,6 @@ import java.sql.SQLException;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.sql.DataSource;
import javax.transaction.RollbackException;
import javax.transaction.Status;
@@ -33,6 +32,7 @@ import javax.transaction.UserTransaction;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.springframework.beans.factory.support.StaticListableBeanFactory;
import org.springframework.jdbc.datasource.lookup.BeanFactoryDataSourceLookup;
import org.springframework.jdbc.datasource.lookup.IsolationLevelDataSourceRouter;

View File

@@ -19,7 +19,6 @@ package org.springframework.jdbc.datasource;
import java.io.ByteArrayOutputStream;
import java.io.PrintWriter;
import java.sql.Connection;
import javax.sql.DataSource;
import org.junit.Test;

View File

@@ -18,7 +18,6 @@ package org.springframework.jdbc.datasource;
import java.sql.Connection;
import java.sql.SQLException;
import javax.sql.DataSource;
import org.junit.Test;

View File

@@ -17,6 +17,7 @@
package org.springframework.jdbc.datasource.embedded;
import org.junit.Test;
import org.springframework.core.io.ClassRelativeResourceLoader;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.jdbc.datasource.init.CannotReadScriptException;

View File

@@ -19,6 +19,7 @@ package org.springframework.jdbc.datasource.embedded;
import javax.sql.DataSource;
import org.junit.Test;
import org.springframework.core.io.ClassRelativeResourceLoader;
import org.springframework.core.io.Resource;
import org.springframework.jdbc.core.JdbcTemplate;

View File

@@ -18,6 +18,7 @@ package org.springframework.jdbc.datasource.init;
import org.junit.After;
import org.junit.Before;
import org.springframework.core.io.ClassRelativeResourceLoader;
import org.springframework.core.io.Resource;
import org.springframework.jdbc.core.JdbcTemplate;

View File

@@ -20,6 +20,7 @@ import java.sql.Connection;
import java.sql.SQLException;
import org.junit.Test;
import org.springframework.jdbc.datasource.DataSourceUtils;
import org.springframework.transaction.support.TransactionSynchronizationManager;

View File

@@ -5,7 +5,7 @@
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -18,6 +18,7 @@ package org.springframework.jdbc.datasource.init;
import org.junit.Test;
import org.mockito.Mockito;
import org.springframework.core.io.Resource;
import static org.junit.Assert.*;

View File

@@ -5,7 +5,7 @@
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -19,6 +19,7 @@ package org.springframework.jdbc.datasource.init;
import java.sql.SQLException;
import org.junit.Test;
import org.springframework.jdbc.datasource.embedded.EmbeddedDatabaseType;
import static org.springframework.jdbc.datasource.init.ScriptUtils.*;

View File

@@ -5,7 +5,7 @@
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
@@ -20,6 +20,7 @@ import java.util.ArrayList;
import java.util.List;
import org.junit.Test;
import org.springframework.core.io.ClassPathResource;
import org.springframework.core.io.support.EncodedResource;

View File

@@ -19,6 +19,7 @@ package org.springframework.jdbc.datasource.lookup;
import javax.sql.DataSource;
import org.junit.Test;
import org.springframework.beans.factory.BeanFactory;
import org.springframework.beans.factory.BeanNotOfRequiredTypeException;

View File

@@ -16,13 +16,13 @@
package org.springframework.jdbc.datasource.lookup;
import static org.junit.Assert.*;
import javax.naming.NamingException;
import javax.sql.DataSource;
import org.junit.Test;
import static org.junit.Assert.*;
/**
* @author Rick Evans
* @author Chris Beams

View File

@@ -16,15 +16,14 @@
package org.springframework.jdbc.datasource.lookup;
import static org.junit.Assert.*;
import java.util.HashMap;
import java.util.Map;
import javax.sql.DataSource;
import org.junit.Test;
import static org.junit.Assert.*;
/**
* @author Rick Evans
* @author Chris Beams

View File

@@ -20,10 +20,10 @@ import java.sql.Connection;
import java.sql.DatabaseMetaData;
import java.sql.PreparedStatement;
import java.sql.Types;
import javax.sql.DataSource;
import org.junit.Test;
import org.springframework.jdbc.core.SqlParameter;
import static org.junit.Assert.*;

View File

@@ -1,11 +1,11 @@
package org.springframework.jdbc.object;
import org.springframework.jdbc.core.RowMapper;
import org.springframework.jdbc.Customer;
import java.sql.ResultSet;
import java.sql.SQLException;
import org.springframework.jdbc.Customer;
import org.springframework.jdbc.core.RowMapper;
public class CustomerMapper implements RowMapper<Customer> {
private static final String[] COLUMN_NAMES = new String[] {"id", "forename"};

View File

@@ -25,11 +25,11 @@ import java.sql.Types;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.sql.DataSource;
import org.junit.Before;
import org.junit.Test;
import org.springframework.beans.factory.BeanFactory;
import org.springframework.beans.factory.support.BeanDefinitionRegistry;
import org.springframework.beans.factory.support.DefaultListableBeanFactory;

View File

@@ -21,7 +21,6 @@ import java.sql.Connection;
import java.sql.Types;
import java.util.HashMap;
import java.util.Map;
import javax.sql.DataSource;
import org.junit.Test;

View File

@@ -19,7 +19,6 @@ package org.springframework.jdbc.object;
import java.sql.Types;
import java.util.HashMap;
import java.util.Map;
import javax.sql.DataSource;
import junit.framework.TestCase;

View File

@@ -27,13 +27,13 @@ import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.sql.DataSource;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.springframework.dao.IncorrectResultSizeDataAccessException;
import org.springframework.dao.InvalidDataAccessApiUsageException;
import org.springframework.jdbc.Customer;

View File

@@ -24,7 +24,6 @@ import java.sql.SQLException;
import java.sql.Types;
import java.util.HashMap;
import java.util.Map;
import javax.sql.DataSource;
import org.junit.After;
@@ -32,6 +31,7 @@ import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.springframework.jdbc.JdbcUpdateAffectedIncorrectNumberOfRowsException;
import org.springframework.jdbc.core.SqlParameter;
import org.springframework.jdbc.support.GeneratedKeyHolder;

View File

@@ -26,7 +26,6 @@ import java.sql.Types;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.sql.DataSource;
import org.junit.After;
@@ -34,6 +33,7 @@ import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.springframework.dao.DataAccessException;
import org.springframework.dao.InvalidDataAccessApiUsageException;
import org.springframework.jdbc.BadSqlGrammarException;

View File

@@ -17,6 +17,7 @@
package org.springframework.jdbc.support;
import java.sql.SQLException;
import org.junit.Before;
import org.junit.Test;

View File

@@ -16,11 +16,11 @@
package org.springframework.jdbc.support;
import java.sql.SQLException;
import org.springframework.dao.DataAccessException;
import org.springframework.dao.TransientDataAccessResourceException;
import java.sql.SQLException;
/**
* Custom SQLException translation for testing.
*

View File

@@ -25,6 +25,7 @@ import java.sql.SQLException;
import java.sql.Statement;
import org.junit.Test;
import org.springframework.jdbc.support.nativejdbc.CommonsDbcpNativeJdbcExtractor;
import org.springframework.jdbc.support.nativejdbc.SimpleNativeJdbcExtractor;

View File

@@ -20,10 +20,10 @@ import java.sql.Connection;
import java.sql.DatabaseMetaData;
import java.sql.SQLException;
import java.util.Arrays;
import javax.sql.DataSource;
import org.junit.Test;
import org.springframework.core.io.ClassPathResource;
import org.springframework.core.io.Resource;

View File

@@ -16,16 +16,16 @@
package org.springframework.jdbc.support;
import org.springframework.dao.DataAccessException;
import org.springframework.dao.TransientDataAccessResourceException;
import org.springframework.jdbc.BadSqlGrammarException;
import java.sql.SQLException;
import junit.framework.TestCase;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;
import org.junit.Test;
import org.springframework.dao.DataAccessException;
import org.springframework.dao.TransientDataAccessResourceException;
import org.springframework.jdbc.BadSqlGrammarException;
/**
* Class to test custom SQLException translation.

View File

@@ -16,11 +16,10 @@
package org.springframework.jdbc.support;
import static org.junit.Assert.*;
import java.sql.SQLException;
import org.junit.Test;
import org.springframework.dao.ConcurrencyFailureException;
import org.springframework.dao.DataAccessException;
import org.springframework.dao.DataAccessResourceFailureException;
@@ -29,6 +28,8 @@ import org.springframework.dao.TransientDataAccessResourceException;
import org.springframework.jdbc.BadSqlGrammarException;
import org.springframework.jdbc.UncategorizedSQLException;
import static org.junit.Assert.*;
/**
* @author Rick Evans
* @author Juergen Hoeller

View File

@@ -27,6 +27,7 @@ import java.sql.Timestamp;
import org.junit.Before;
import org.junit.Test;
import org.springframework.jdbc.InvalidResultSetAccessException;
import static org.junit.Assert.*;