提交 0ef971b8 编写于 作者: J Juergen Hoeller

polishing

上级 b062de11
/*
* Copyright 2002-2009 the original author or authors.
* Copyright 2002-2010 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.
......@@ -19,7 +19,7 @@ package org.springframework.core.convert;
import org.springframework.core.NestedRuntimeException;
/**
* Base class for exceptions thrown by the convert system.
* Base class for exceptions thrown by the conversion system.
*
* @author Keith Donald
* @since 3.0
......@@ -29,18 +29,18 @@ public abstract class ConversionException extends NestedRuntimeException {
/**
* Construct a new conversion exception.
* @param message the exception message
* @param cause the cause
*/
public ConversionException(String message, Throwable cause) {
super(message, cause);
public ConversionException(String message) {
super(message);
}
/**
* Construct a new conversion exception.
* @param message the exception message
* @param cause the cause
*/
public ConversionException(String message) {
super(message);
public ConversionException(String message, Throwable cause) {
super(message, cause);
}
}
......@@ -29,6 +29,7 @@ public final class ConverterNotFoundException extends ConversionException {
private final TypeDescriptor targetType;
/**
* Creates a new conversion executor not found exception.
* @param sourceType the source type requested to convert from
......@@ -42,6 +43,7 @@ public final class ConverterNotFoundException extends ConversionException {
this.targetType = targetType;
}
/**
* Returns the source type that was requested to convert from.
*/
......
/*
* Copyright 2002-2008 the original author or authors.
* Copyright 2002-2010 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.
......@@ -40,8 +40,8 @@ public abstract class FileSystemUtils {
if (root.isDirectory()) {
File[] children = root.listFiles();
if (children != null) {
for (int i = 0; i < children.length; i++) {
deleteRecursively(children[i]);
for (File child : children) {
deleteRecursively(child);
}
}
}
......@@ -77,9 +77,8 @@ public abstract class FileSystemUtils {
if (entries == null) {
throw new IOException("Could not list files in directory: " + src);
}
for (int i = 0; i < entries.length; i++) {
File file = entries[i];
doCopyRecursively(file, new File(dest, file.getName()));
for (File entry : entries) {
doCopyRecursively(entry, new File(dest, entry.getName()));
}
}
else if (src.isFile()) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册