Remove redundant throws

This commit is contained in:
Timo Westkämper 2013-12-15 21:20:08 +02:00
parent 54937f00fa
commit 06fb07c6a3
4 changed files with 6 additions and 11 deletions

View File

@ -312,13 +312,9 @@ public class BeanMap extends AbstractMap<String, Object> implements Cloneable {
* @param name the name of the property to set
* @param value the value to set that property to
* @return the previous value of that property
* @throws IllegalArgumentException if the given name is null;
* if the given name is not a {@link String}; if the bean doesn't
* define a property with that name; or if the bean property with
* that name is read-only
*/
@Override
public Object put(String name, Object value) throws IllegalArgumentException, ClassCastException {
public Object put(String name, Object value) throws ClassCastException {
if (bean != null) {
Object oldValue = get(name);
Method method = getWriteMethod(name);
@ -657,7 +653,7 @@ public class BeanMap extends AbstractMap<String, Object> implements Cloneable {
* @throws IllegalArgumentException if any other exception is raised
* by {@link #convertType(Class,Object)}
*/
protected Object[] createWriteMethodArguments(Method method, Object value) throws IllegalAccessException, ClassCastException {
protected Object[] createWriteMethodArguments(Method method, Object value) throws IllegalAccessException {
try {
if (value != null) {
Class<?>[] types = method.getParameterTypes();
@ -708,10 +704,9 @@ public class BeanMap extends AbstractMap<String, Object> implements Cloneable {
* @throws InvocationTargetException if the constructor found with
* reflection raises it
* @throws IllegalAccessException never
* @throws IllegalArgumentException never
*/
@SuppressWarnings({ "rawtypes", "unchecked" })
protected Object convertType(Class<?> newType, Object value) throws InstantiationException, IllegalAccessException, IllegalArgumentException, InvocationTargetException {
protected Object convertType(Class<?> newType, Object value) throws InstantiationException, IllegalAccessException, InvocationTargetException {
// try call constructor
Class<?>[] types = {value.getClass()};
try {

View File

@ -148,7 +148,7 @@ public class HibernateDomainExporter extends AbstractDomainExporter{
@Override
protected void collectTypes() throws IOException, XMLStreamException, ClassNotFoundException,
SecurityException, NoSuchMethodException {
NoSuchMethodException {
// super classes
Iterator<?> superClassMappings = configuration.getMappedSuperclassMappings();
while (superClassMappings.hasNext()) {

View File

@ -145,7 +145,7 @@ public class JPADomainExporter extends AbstractDomainExporter {
@Override
protected void collectTypes() throws IOException, XMLStreamException, ClassNotFoundException,
SecurityException, NoSuchMethodException {
NoSuchMethodException {
Map<ManagedType<?>, EntityType> types = Maps.newHashMap();
for (ManagedType<?> managedType : configuration.getManagedTypes()) {

View File

@ -179,7 +179,7 @@ public class AntMetaDataExporter extends Task {
private boolean beanPrintSupertype;
@Override
public void execute() throws BuildException {
public void execute() {
Connection dbConn = null;
File targetPackagePath = new File(targetSourceFolder);